Web lists-archives.com

[Mingw-users] skipping incompatible libfl.a when searching for -lfl




I am reading the O'Reilly flex and bison book and trying to build the very first program on page 4.

I have mingw installed and I downloaded the flex and bison executables and have them in my path.

I am running on Windows 7 64 bit.

I am using the bash shell 

First line worked:

flex fb1-1.l

then next line I used:

$ gcc lex.yy.c -lfl
fb1-1.l: In function 'yylex':
fb1-1.l:17:21: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
 [a-zA-Z]+ { words++; chars += strlen(yytext); }
                     ^~~~~~
fb1-1.l:17:21: warning: incompatible implicit declaration of built-in function 'strlen'
fb1-1.l:17:21: note: include '<string.h>' or provide a declaration of 'strlen'
fb1-1.l: At top level:
fb1-1.l:23:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^~~~
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../lib/libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../lib\libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../..\libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../lib/libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../libfl.a when searching for -lfl
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lfl
collect2.exe: error: ld returned 1 exit status


I do have a liblf.a file in C:\MinGW\lib

my path includes:
/mingw64/bin:/mingw64/bin:/c/MinGW/msys/1.0/bin:/c/MinGW/bin:/mingw64/bin:

gcc is installed in C:\MinGW\bin\gcc.exe

Why am I getting skipping incompatible version for libfl.a and how can I fix this?


------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe