pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RE: [INTERFACES] RE: libpq++ and gcc
2+ messages / 2 participants
[nested] [flat]

* RE: [INTERFACES] RE: libpq++ and gcc
@ 1998-10-07 08:22 Josh Friess <jjfriess@vicidesign.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Friess @ 1998-10-07 08:22 UTC (permalink / raw)
  To: 'joris.esch@esat.kuleuven.ac.be' <joris.esch@esat.kuleuven.ac.be>; +Cc: pgsql-interfaces; 'pgsql-novice@postgresql.org' <pgsql-novice@postgresql.org>

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@vicidesign.com
http://www.vicidesign.com

-----Original Message-----
From:	Joris Esch [SMTP:joris.esch@esat.kuleuven.ac.be]
Sent:	Wednesday, October 07, 1998 7:46 AM
To:	pgsql-interfaces@postgreSQL.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.
	



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: libpq++ and gcc
@ 1998-10-07 12:46 Joris Esch <joris.esch@esat.kuleuven.ac.be>
  0 siblings, 0 replies; 2+ messages in thread

From: Joris Esch @ 1998-10-07 12:46 UTC (permalink / raw)
  To: pgsql-interfaces

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.
	



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-10-07 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-10-07 08:22 RE: [INTERFACES] RE: libpq++ and gcc Josh Friess <jjfriess@vicidesign.com>
1998-10-07 12:46 RE: libpq++ and gcc Joris Esch <joris.esch@esat.kuleuven.ac.be>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox