Re: unresolved externals when linking app with libpq

Поиск
Список
Период
Сортировка
От eljot
Тема Re: unresolved externals when linking app with libpq
Дата
Msg-id 42C28486.1060807@elkomtech.com.pl
обсуждение исходный текст
Ответ на Re: unresolved externals when linking app with libpq 8.03  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
Tom Lane wrote:

>eljot <eljot@elkomtech.com.pl> writes:
>  
>
>>I was able to link my postgresql apps successfully when I was using 
>>PostgreSQL version 8.0.1 or earlier. Now (v. 8.0.3) the linker tells me 
>>there is many unresolved externals.
>>    
>>
>Apparently you've configured the new Postgres build with SSL and
>Kerberos support, which you didn't have in your 8.0.1 build.  
>
No, I didn't change anything. The only thing I did is I had copied the 
proper .h files and libpq.a file to specified directories on my 
development machine. I must compile my apps for various versions of 
postgres (and some other rdbms as well) in the same time, so I can't 
directly use c-interface files installed by postgresql itself. I didn't 
change my makefile at all. So I think the problem may be with 
compilation of files included in new version of libpq.a  (PostgreSQL 
8.0.3 from FC4).

>[...]
>Alternatively, look at psql with ldd to find out what libraries it
>depends on.
>  
>
Thanks a lot, it was really helpful. If anybody is interested in this is 
a part of command for linker which has given me a success:

-lpq -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -ltermcap -lcrypt 
-lresolv -lnsl -ldl -lpthread -lgssapi_krb5 -lcom_err -lk5crypto 
-lkrb5support -lgcc_eh

For postgresql 8.0.1 and earlier linking only with with -lpq was sufficient.

The executable file growed fom 1.0MB (8.0.1) to 2.3MB (8.0.3) and I'm 
afraid it may not work without recompiling under other Linux 
distributions (I will test it's behaviour on FC3, RH9 & SUSE 9.3 soon) 
due to many additional shared libraries used. So I'd like to get rid of 
extra libs if it is possible of course, and still have no idea how to do 
this.

Than's again for your help.

>            regards, tom lane
>
>  
>

-- 
Regards
Jarek Lubczynski

There are 10 kinds of people:
Those who understand binary and those who don't



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unresolved externals when linking app with libpq 8.03
Следующее
От: Murray Cumming
Дата:
Сообщение: Re: Driver for Gnome/GTK Applications.....