This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How do I link programs created with flex and bison.


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]