Subject: problems linking with -lfl option
Package: flex-old
Version: 2.5.4a-7
Severity: normal
I have the following file:
%option noyywrap
%{
int voc,con;
%}
%%
a|e|i|o|u voc++;
[a-z] con++;
. ;
%%
int main(){
yylex();
printf("voc: %3d con: %3d\n",voc,con);
}
just a simple example... if I do
flex file.l; gcc lex.yy.c
everything is ok, but if i remove the
%option noyywrap
directive, and do
flex file.l; gcc -lfl lex.yy.c
I get these errors:
/tmp/ccgksxij.o: In function `main':
lex.yy.c:(.text+0xfdd): multiple definition of `main'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libfl.a(libmain.o):/home/srivasta/flex-old-2.5.4a/libmain.c:10:
first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 27 in
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libfl.a(libmain.o) to 62 in
/tmp/ccgksxij.o
/tmp/ccgksxij.o: In function `yylex':
lex.yy.c:(.text+0x341): undefined reference to `yywrap'
/tmp/ccgksxij.o: In function `input':
lex.yy.c:(.text+0xaeb): undefined reference to `yywrap'
collect2: ld returned 1 exit status
I have the same problem with flex package.
Greetings
Paolo Pantaleo
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (800, 'testing'), (70, 'stable'), (60, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Versions of packages flex-old depends on:
ii libc6 2.3.6.ds1-7 GNU C Library: Shared libraries
Versions of packages flex-old recommends:
ii gcc [c-compiler] 4:4.1.1-13 The GNU C compiler
ii gcc-4.0 [c-compiler] 4.0.3-3 The GNU C compiler
ii gcc-4.1 [c-compiler] 4.1.1-19 The GNU C compiler
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]