Re: Compiling Test Programs

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Compiling Test Programs
Дата
Msg-id Pine.LNX.4.30.0105151623420.757-100000@peter.localdomain
обсуждение исходный текст
Ответ на Compiling Test Programs  (Scott Holmes <sholmes@pacificnet.net>)
Список pgsql-interfaces
Scott Holmes writes:

> 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

You need to link against libpq.  Add '-lpq' to the compilation line.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: "Michael Ansley (UK)"
Дата:
Сообщение: RE: How to connect via C++?
Следующее
От: ROMAN Andres Carlos
Дата:
Сообщение: Searchin libpq.dll & libpq++.dll