How do I link programs created with flex and bison.

Tony Stratton tonys@apprentice.com
Tue Dec 22 13:30:00 GMT 1998


I am attempting to link the programs with VC++ instead of gcc, because the resultant .exe is one-tenth the size.

Anyway, I have succesfully linked a flex lexer like this:

cl lex.yy.c /link libfl.a 

however the following does not work.

cl test.tab.c lex.yy.c /link libfl.a 
Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022
Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

/out:st.tab.exe
/out:test.exe
libfl.a
st.tab.obj
lex.yy.obj
st.tab.obj : error LNK2001: unresolved external symbol _alloca
st.tab.obj : error LNK2001: unresolved external symbol _yyerror
libfl.a(libmain.o) : error LNK2001: unresolved external symbol ___main
test.exe : fatal error LNK1120: 3 unresolved externals


It seems that I need to link a bison library.

Does any one know what this is?
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list