From: | Josh Friess <jjfriess(at)vicidesign(dot)com> |
---|---|
To: | "'joris(dot)esch(at)esat(dot)kuleuven(dot)ac(dot)be'" <joris(dot)esch(at)esat(dot)kuleuven(dot)ac(dot)be> |
Cc: | "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>, "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org> |
Subject: | RE: [INTERFACES] RE: libpq++ and gcc |
Date: | 1998-10-07 08:22:02 |
Message-ID: | 01BDF1A1.A9242970.jjfriess@vicidesign.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Hi everyone,
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++
library.
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...
------------------------------------------------
Josh Friess
Vici Design, LLC.
jjfriess(at)vicidesign(dot)com
http://www.vicidesign.com
-----Original Message-----
From: Joris Esch [SMTP:joris(dot)esch(at)esat(dot)kuleuven(dot)ac(dot)be]
Sent: Wednesday, October 07, 1998 7:46 AM
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: [INTERFACES] RE: libpq++ and gcc
Hello everybody:
KaDe wrote:
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
command.
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:
PGLIB=/usr/lib
export PGLIB
My headers are in /usr/include. There i have a libpq++.h which i
#include.
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.
good luck
joris
--
joris esch, student in electrical engineering
Power is knowledge.
From | Date | Subject | |
---|---|---|---|
Next Message | bugman | 1998-10-07 09:26:26 | bug report (i think :-/ ) |
Previous Message | Thomas G. Lockhart | 1998-10-07 02:42:24 | Re: [INTERFACES] re : libpq++ - getting it to work |