postgresql and C++/C - Mailing list pgsql-general

From vdm.fbsd@virgilio.it
Subject postgresql and C++/C
Date
Msg-id 15463230.1127898705289.JavaMail.root@pswm16.cp.tin.it
Whole thread Raw
Responses Re: postgresql and C++/C
Re: postgresql and C++/C
List pgsql-general
Context:FREEBSD 5.4, postgresql 8.0.3

I'm not a C newbye and I'm
having a go at compiling my first, simple C(++) program:

#include
<libpq-fe.h>
int main()
{
PGconn *psql;
psql = PQconnectdb("hostaddr =
'127.0.0.1' port = '' dbname = 'curve' user = 'vi
return 0;
}

But
when
I compile it the following message pops up:

vicbsd# gcc -I
/usr/local/include prova.cpp -o prova
/var/tmp//cceNJFrs.o(.text+0x25):
In function `main':
: undefined reference to `PQconnectdb'
/var/tmp//cceNJFrs.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'


What's wrong with it?
Ciao
Vittorio




pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: database bloat, but vacuums are done, and fsm seems to be setup ok
Next
From: Peter Wiersig
Date:
Subject: Re: postgresql and C++/C