Subject: How do I link programs created with flex and bison.
From: [email-masked] (Tony Stratton)

22 Dec 1998 17:24:22 -0800
Message-ID: <[email-masked]>
To: [email-masked]

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
"[email-masked]" with one line of text: "help".