postgresql and C++/C
| От | vdm.fbsd@virgilio.it |
|---|---|
| Тема | postgresql and C++/C |
| Дата | |
| Msg-id | 15463230.1127898705289.JavaMail.root@pswm16.cp.tin.it обсуждение исходный текст |
| Ответы |
Re: postgresql and C++/C
Re: postgresql and C++/C |
| Список | 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 по дате отправления: