Mail Archives: cygwin/2004/02/10/23:32:50
On Wed, 11 Feb 2004, King Lung Chiu wrote:
> Hi,
>
> I'm trying to port some code (KX509) to cygwin that needs to use librsolv.
> I've installed minires-devl-0.98-1, but make (of KX509) always fails with
> 'undefined reference to '___res_search' and '___dn_expand':
>
> ...
> gcc -o kx509 -g -O2 -DUSE_KRB5 kx509.o debug.o getcert.o\
> get_kca_list.o
> get_realm.o store_in_cc.o store_tkt.o ../lib/libkx.a -L/usr/lib -L/usr
> -lcrypto -L/opt/krb5-1.3.1//lib -lkrb5 -lk5crypto -lcom_err
> get_kca_list.o(.text+0xf9): In function `get_kca_list':
> /opt/src/kx509/cygwin_w2k/client/../../src/client/get_kca_list.c:266:
> undefined reference to `___res_search'
> get_kca_list.o(.text+0x174):/opt/src/kx509/cygwin_w2k/client/../../src/\
> client/get_kca_list.c:294: undefined reference to `___dn_expand'
> ...
> collect2: ld returned 1 exit status
> make[1]: *** [kx509] Error 1
> make[1]: Leaving directory `/opt/src/kx509/cygwin_w2k/client'
>
> I've set up the lib links as follows:
>
> $ cd /usr/lib; ls -l libresolv* libminires.*
> -rwxrwxrwx 1 guest Users 453200 Jan 22 11:45 libminires.a
> -rwxrwxrwx 1 guest Users 21784 Jan 22 11:45 libminires.dll.a
> lrwxrwxrwx 1 guest Users 135 Feb 10 12:20 libresolv.dll.a -> /usr/lib/libminires.dll.a
> lrwxrwxrwx 1 guest Users 127 Feb 11 13:22 libresolv.a -> /usr/lib/libminires.a
>
> and the libraries seem to have the required functions:
>
> $ nm -s libresolv.dll.a | grep ___res_search
> ___res_search in d000016.o
> __imp____res_search in d000016.o
> 00000000 T ___res_search
> 00000000 I __imp____res_search
>
> $ nm -s libresolv.a | grep ___res_search
> ___res_search in minires.o
> 00001b78 T ___res_search
>
> So how can I make gcc find ___res_search and ___dn_expand? Did I miss
> something?
>
> regards
> King Lung Chiu
I don't believe the above command even attempts to link to the "resolv"
library. There is certainly no -lresolv anywhere on that line...
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -