Обсуждение: POSTGRES.. NEED HELP

Поиск
Список
Период
Сортировка

POSTGRES.. NEED HELP

От
Richy Gerard
Дата:
While using embedded sql in postgres,
a. Installed the ecpg library
b. after installation i couldn't compile the program prog1.c
ERROR:
richy@ubuntu:~/Desktop$ ecpg prog1.pgc
richy@ubuntu:~/Desktop$ cc -c prog1.c
prog1.c:3:22: error: ecpgtype.h: No such file or directory
prog1.c:4:21: error: ecpglib.h: No such file or directory
prog1.c:5:23: error: ecpgerrno.h: No such file or directory
prog1.c:6:19: error: sqlca.h: No such file or directory
prog1.pgc:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘into’
prog1.pgc:1:26: warning: multi-character character constant



--
GERARD

Re: POSTGRES.. NEED HELP

От
Dimitri Fontaine
Дата:
Hi,

Richy Gerard <idbisoft@gmail.com> writes:

> prog1.c:3:22: error: ecpgtype.h: No such file or directory
> prog1.c:4:21: error: ecpglib.h: No such file or directory
> prog1.c:5:23: error: ecpgerrno.h: No such file or directory
> prog1.c:6:19: error: sqlca.h: No such file or directory
> prog1.pgc:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘into’
> prog1.pgc:1:26: warning: multi-character character constant

Did you install libecpg-dev?
  http://packages.ubuntu.com/jaunty/libecpg-dev

--
dim

Re: POSTGRES.. NEED HELP

От
raghu ram
Дата:


On Mon, Sep 7, 2009 at 8:48 PM, Richy Gerard <idbisoft@gmail.com> wrote:
While using embedded sql in postgres,
a. Installed the ecpg library
b. after installation i couldn't compile the program prog1.c
ERROR:
richy@ubuntu:~/Desktop$ ecpg prog1.pgc
richy@ubuntu:~/Desktop$ cc -c prog1.c
prog1.c:3:22: error: ecpgtype.h: No such file or directory
prog1.c:4:21: error: ecpglib.h: No such file or directory
prog1.c:5:23: error: ecpgerrno.h: No such file or directory
prog1.c:6:19: error: sqlca.h: No such file or directory
prog1.pgc:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘into’
prog1.pgc:1:26: warning: multi-character character constant




Follow the below steps to execute the embedded sql program in postgres

 

 (1)  ./ecpg -t test.pgc

 

(2) export LD_LIBRARY_PATH=/usr/local/pgsql/lib

 

(3) gcc -o test test.c -lpgport -lz -lreadline -ltermcap -lcrypt -lxml2 -lresolv -lnsl -ldl -lm -lbsd -lecpg -lpq -I /usr/local/pgsql/include/ -L /usr/local/pgsql/lib -lpgtypes

 

(4)  ./test



Regards

Raghu Ram