Thread: kdevelop -> libpq-fe.h
I am trying to build an C program that uses libpq. I get an error message ( I use kdevelop in a Red Hat Linux 6.2 ) . I am trying to use the example in file:/usr/doc/postgresql-7.0.2/programmer/libpq-chapter.htm But I got this message: c++ -DHAVE_CONFIG_H -I. -I. -I.. -O0 -g3 -Wall -c main.cpp main.cpp:8: libpq-fe.h: No such file or directory gmake: *** [main.o] Error 1 *** failed *** Any help ? eduardo K
On Mon, 14 Aug 2000, Eduardo Kotujansky wrote: > I am trying to build an C program that uses libpq. I get an error message > ( I use kdevelop in a Red Hat Linux 6.2 ) . I am trying to use the example in > > file:/usr/doc/postgresql-7.0.2/programmer/libpq-chapter.htm > > But I got this message: > > > c++ -DHAVE_CONFIG_H -I. -I. -I.. -O0 -g3 -Wall -c main.cpp > main.cpp:8: libpq-fe.h: No such file or directory > gmake: *** [main.o] Error 1 > *** failed *** > > Any help ? It's been a while, but I remember this problem too on my RedHat install. On my RH install, the file is at: /usr/include/pgsql/libpq-fe.h But the program reads: #include "libpq-fe.h" ##note no absolute path Maybe you need a -I option on the compiler command pointing to the directory that contains "libpq-fe.h" ?? See '-I' option in man gcc. -- Hugh Lawson Greensboro, North Carolina hlawson@triad.rr.com
Copy the include file to the directory where you have the c file. -- Jesus Aneiros Sosa mailto:aneiros@jagua.cfg.sld.cu http://jagua.cfg.sld.cu/~aneiros On Mon, 14 Aug 2000, Hugh Lawson wrote: > On Mon, 14 Aug 2000, Eduardo Kotujansky wrote: > > > I am trying to build an C program that uses libpq. I get an error message > > ( I use kdevelop in a Red Hat Linux 6.2 ) . I am trying to use the example in > > > > file:/usr/doc/postgresql-7.0.2/programmer/libpq-chapter.htm > > > > But I got this message: > > > > > > c++ -DHAVE_CONFIG_H -I. -I. -I.. -O0 -g3 -Wall -c main.cpp > > main.cpp:8: libpq-fe.h: No such file or directory > > gmake: *** [main.o] Error 1 > > *** failed *** > > > > Any help ? > > > It's been a while, but I remember this problem too on my RedHat install. > > On my RH install, the file is at: /usr/include/pgsql/libpq-fe.h > > But the program reads: > > #include "libpq-fe.h" ##note no absolute path > > Maybe you need a -I option on the compiler command pointing to the > directory that contains "libpq-fe.h" ?? See '-I' option in man gcc. > > > > -- > Hugh Lawson > Greensboro, North Carolina > hlawson@triad.rr.com > >