Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Markus Hoenicka" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15017.14443.588000.398989@gargle.gargle.HOWL> Date: Fri, 9 Mar 2001 20:09:15 +0000 (CT0) To: cygwin AT cygwin DOT com Subject: Re: readline DLL problem In-Reply-To: <3AA7AC08.77932801@ece.gatech.edu> References: <15015 DOT 41583 DOT 251000 DOT 683674 AT gargle DOT gargle DOT HOWL> <3AA7AC08 DOT 77932801 AT ece DOT gatech DOT edu> X-Mailer: VM 6.75 under Emacs 20.6.1 Charles S. Wilson writes: > Are you sure that you're using the correct -Ddefine's to link > dynamically/statically? check /usr/doc/Cygwin/readline-4.1.README. > > Also, using a freshly updated box (with the since-deprecated > gcc-2.95.2-7), and using the readline-4.1-2-src.tar.gz package, fileman > builds cleanly ("CC='gcc -mwin32' ./configure --prefix=/usr > --with-ncurses") Using gcc-2.95.2-6 (current official version) you > don't need to specify CC. Ok, after fiddling around the problem looks a bit different. If I build fileman.exe with the supplied Makefile, it works as advertised. But by default the Makefile lets gcc use the headers in the source directory, not the installed headers. This is not what happens if I build other apps using the readline library. So I try building fileman.exe using the system headers. The following commands do just this (I put a copy of config.h into the examples directory, so -I. will find this, but no other headers. I leave out -DREADLINE_LIBRARY as this would force using the source directory headers): markus AT WUTZ ~/prog/cygnus-b20/readline-4.1/examples $ gcc -DHAVE_CONFIG_H -g -O -I. -c fileman.c -o fileman.so markus AT WUTZ ~/prog/cygnus-b20/readline-4.1/examples $ gcc -o fileman.exe fileman.so -lreadline -ltermcap fileman.so(.text+0x399): undefined reference to `rl_readline_name' fileman.so(.text+0x3a3): undefined reference to `rl_attempted_completion_functio n' collect2: ld returned 1 exit status So this doesn't work, apparently because gcc can't find the library headers. But if I run: markus AT WUTZ ~/prog/cygnus-b20/readline-4.1/examples $ gcc -DHAVE_CONFIG_H -g -O -I. -I/usr/include -c fileman.c -o fileman.so markus AT WUTZ ~/prog/cygnus-b20/readline-4.1/examples $ gcc -o fileman.exe fileman.so -lreadline -ltermcap all is fine again. I may just be waking up from a dream, but I can't remember that I ever had to explicitly specify -I/usr/include to find standard headers. Maybe one of those things that everyone knows but me. regards, Markus -- Markus Hoenicka, PhD UT Houston Medical School Dept. of Integrative Biology and Pharmacology 6431 Fannin MSB4.114 Houston, TX 77030 (713) 500-6313, -7477 (713) 500-7444 (fax) Markus DOT Hoenicka AT uth DOT tmc DOT edu http://ourworld.compuserve.com/homepages/hoenicka_markus/ -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple