Linking app to PgSQL

Started by Mayanover 24 years ago2 messagesgeneral
Jump to latest
#1Mayan
escalante@canada.com

To access the back end of PostgreSQL using C++, according to Bruce
Monjian, the author of "PostgreSQL Introduction and concept", one must
include 'libpq++.h' in the source file, link the app to '-L
/usr/local/pgsql/include' as well as interfacing to '-I
/user/local/pgsql/include'.
However, the directories for the linking and interfacing do not exist in
my systems. Thus my question:
How do I determine where are the files that I have to Interface and Link
located?

I am using Qt and tmake form troll tech to develop the application, any
suggestions are welcome.

--
My Computer's Opinion
~~~~~~~~~~~~~~~~~~~~~~

if( desire == play_games() ){return getNintendo64();}
if( (desire == computing() ) && (user != smart) )
{return getMicrosoft();}
if( ( desire == computing() ) && (user == smart) )
{return getLinux();}

#2Steve Wolfe
steve@iboats.com
In reply to: Mayan (#1)
Re: Linking app to PgSQL

To access the back end of PostgreSQL using C++, according to Bruce
Monjian, the author of "PostgreSQL Introduction and concept", one must
include 'libpq++.h' in the source file, link the app to '-L
/usr/local/pgsql/include' as well as interfacing to '-I
/user/local/pgsql/include'.
However, the directories for the linking and interfacing do not exist in
my systems. Thus my question:
How do I determine where are the files that I have to Interface and Link
located?

It sounds like you're on a RedHat system, and they will be in other
locations, I just don't recall where RH puts them. Try "locate libpq*.h".
Failing that, you can always do 'find / -name libpq*.h -print', but that
will defenitely take longer.

steve