I sent mail to these lists about a month ago, and got a few responses about
the same thing. Apparently my mail system was down, but now it's up again.
I have written several applications for use with postgres. All of them
compile; none of them link. They all raise undefined symbol errors during
the linking phase because I'm not linking properly with the libpq++
I originally had installed postgres6.3.2 via an rpm from RedHat. Today I
downloaded the tar.gz'ed source and followed the installation instructions
exactly. I finished, and tried compiling/linking my code using the -lpq
and -lpq++ options, and neither of them worked.
I am a novice to g++. I know about 4 flags, and for the most part (until
now) I have gotten by fine. I really don't know how to configure this
properly. The documentation on libpq/++ is limited. Could someone please,
please help me? I have no idea where to go from here...
Vici Design, LLC.
From: Joris Esch [SMTP:joris(dot)esch(at)esat(dot)kuleuven(dot)ac(dot)be]
Sent: Wednesday, October 07, 1998 7:46 AM
Subject: [INTERFACES] RE: libpq++ and gcc
Did you get an answer ?
I think the problem is a question of path ...
you have to add something as -L.. -pq -pq++ as parameters for your gcc
I can't remember precisely, have a look in the makefile of the libpq++
directory and try to guess.
I resolved the problem of the path access copying all the headers files of
postgres 1 level of directory upper.
I'm sure there is a smarter way, but I've not yet found it.
I hope this can help you:
in /etc/profile, i have:
My headers are in /usr/include. There i have a libpq++.h which i
Then, when i compile i type e.g.:
c++ test_pgsql_libpq++.cpp -o test_pgsql_libpq++ -lpq++ -lpq (Lowercase L)
If your headers are elsewhere, try -I/my_header_directory (Uppercase i ).
I use egcs, but it doesn't differ much from gcc, i think.
joris esch, student in electrical engineering
Power is knowledge.
pgsql-interfaces by date
|Next:||From: bugman||Date: 1998-10-07 09:26:26|
|Subject: bug report (i think :-/ )|
|Previous:||From: Thomas G. Lockhart||Date: 1998-10-07 02:42:24|
|Subject: Re: [INTERFACES] re : libpq++ - getting it to work|