Skip site navigation (1) Skip section navigation (2)

RE: libpq++ and gcc

From: Joris Esch <joris(dot)esch(at)esat(dot)kuleuven(dot)ac(dot)be>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: RE: libpq++ and gcc
Date: 1998-10-07 12:46:00
Message-ID: 98100714555700.00973@tintin (view raw, whole thread or download thread mbox)
Lists: 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 
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: 
export PGLIB

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.

good luck
joris esch, student in electrical engineering
		Power is knowledge.

pgsql-interfaces by date

Next:From: Peter T MountDate: 1998-10-07 21:31:04
Subject: New JDBC Driver Patch
Previous:From: Josh FriessDate: 1998-10-07 09:47:19
Subject: just noticed something about libpq++ linking...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group