Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Tue, 10 Feb 2004 23:32:29 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: King Lung Chiu cc: cygwin AT cygwin DOT com Subject: Re: minires undefined '___res_search' In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 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/