Re: [HACKERS] libpq++ linking

Поиск
Список
Период
Сортировка
От Maarten Boekhold
Тема Re: [HACKERS] libpq++ linking
Дата
Msg-id Pine.SUN.3.91.980122212143.27856A-100000@dutepp0.et.tudelft.nl
обсуждение исходный текст
Ответ на libpq++ linking  ("Vazsonyi Peter[ke]" <neko@kornel.szif.hu>)
Список pgsql-hackers
On Thu, 22 Jan 1998, Vazsonyi Peter[ke] wrote:

> Hello!
>
> I try to use libpq++ (linux: redhat4.2, postgresql-(devel)?-6.2 GNU c)
> And i have problem with linking:
>
> [root@3dom neko]# g++ -I/usr/include/postgres/ -lpq++ -o a a.cc
> /tmp/cca032541.o: In function ain':
> /tmp/cca032541.o(.text+0x22): undefined reference to gConnection::Exec(char
> const *)'
> ...
> And more like this. But where is this famous exec?
>
> [root@3dom neko]# nm -C /usr/lib/libpq++.a | grep 'Exec(char'
> 00000348 T PgConnection::Exec(char const *)
>          U PgConnection::Exec(char const *)
>
> All right. In libpq++.
> And I use this lib?
> [root@3dom neko]# mv /usr/lib/libpq++.a .
> [root@3dom neko]# g++ -I/usr/include/postgres/ -lpq -lpq++ -o e e.cc
> ld: cannot open -lpq++: No such file or directory
> Yes. We were use before this.

Try putting the -lpq++ *after* your input files, ie. last on the line.

Maarten

_____________________________________________________________________________
|     Maarten Boekhold, Faculty of Electrical Engineering TU Delft,   NL    |
|           Computer Architecture and Digital Technique section             |
|                          M.Boekhold@et.tudelft.nl                         |
-----------------------------------------------------------------------------


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

Предыдущее
От: Keith Parks
Дата:
Сообщение: varchar() troubles. (S/Linux)
Следующее
От: "Michael J. Rogan"
Дата:
Сообщение: Oid Questions