From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Error in compiling Date: Mon, 08 Dec 1997 12:52:31 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 36 Message-ID: <348BDF7F.6ED8724D@LSTM.Ruhr-UNI-Bochum.De> References: <01bd033d$4acfe970$ca238380 AT phobos> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Fatzi Michael wrote: > > When I use a FLEX-generated *.c file (with DJGPP V2) > gcc -lfl lexyy.c > > i get an interesting error and not an executable DOS-file: > > lexyy.c(.text+0x793): undefined reference to `yywrap' > lexyy.c(.text+0xf31): undefined reference to `yywrap' > > or whe i use > gcc -O3 -o test1.exe lexyy.c -lm > i get the following message: Try gcc -o foo.exe lexyy.c -lfl instead. As the FAQ points out somewhere, ld is a one pass linker, so you must give the libraries at the end of the command line, and with several libs, order may become significant. -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************