Reputation: 23
My program uses libary libfl.a (flex library). I compile it under linux:
gcc lex.yy.c -lfl
I have mingw compiler installed i586-mingw32msvc-gcc
(simple 'hello world' stuff compiles without problem)
I use ubuntu (probably does not matter)
I want to compile under linux for windows (produce binary .exe file which would be usable on windows)
When I try compiling my program
i586-mingw32msvc-gcc lex.yy.c -lfl
I get errors:
[...] undefined reference to '_yywrap'
[...] undefined reference to '_WinMain@16'
libfl.a
also with i586-mingw32msvc-gcc to be able to use it in this cross-compilation?yywrap()
, but not _yywrap()
. Why I get error for function with underscore _
?_WinMain@16
? (no usage in source code)My goal would be to understand what is happening here. If I get it to work, then its bonus points :)
Any help is appreciated
Upvotes: 2
Views: 1627
Reputation: 5225
Upvotes: 2