Compiling Test Programs

Поиск
Список
Период
Сортировка
От Scott Holmes
Тема Compiling Test Programs
Дата
Msg-id 200105150021.RAA26991@scotts.mynetwork.net
обсуждение исходный текст
Ответы Re: Compiling Test Programs
Список pgsql-interfaces
I am by no means a C programmer and I don't know much about Makefiles so I 
need a little assistance here.  I have Postgresql7.1 compiled from the tar 
ball and it's working fine.  But now I need to write a program using libpg.  I 
have psql working fine as well as PHP4 so I've assumed libpg has been included 
in my installation.  But when I go to compile testlibpq.c  I get:

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations 
-I../../../src/interfaces/libpq -I../../../src/include   
-Wl,-rpath,/usr/local/pgsql/lib  testlibpq.c   -o testlibpq
/tmp/ccy2shMg.o: In function `exit_nicely':
/tmp/ccy2shMg.o(.text+0x7): undefined reference to `PQfinish'
/tmp/ccy2shMg.o: In function `main':
/tmp/ccy2shMg.o(.text+0x30): undefined reference to `PQsetdbLogin'
/tmp/ccy2shMg.o(.text+0x39): undefined reference to `PQstatus'
...
/tmp/ccy2shMg.o(.text+0x205): undefined reference to `PQfinish'
collect2: ld returned 1 exit status
make: *** [testlibpq] Error 1

I do have /usr/local/pgsql/lib/libpq.a

Perhaps someone can point me in the proper direction.





В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Giorgio Valoti
Дата:
Сообщение: Re: Including Perl DBI in our CVS
Следующее
От: Carlos Moreno
Дата:
Сообщение: C++ interface on RH Linux 6.2