From: DJ Delorie Subject: Re: How do I link programs created with flex and bison. 22 Dec 1998 20:29:33 -0500 Message-ID: <3680477D.1921C6F5@delorie.com> References: <19981222213034 DOT 2843 DOT qmail DOT cygnus DOT gnu-win32 AT findmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.126 i586) X-Accept-Language: en Tony Stratton wrote: > st.tab.obj : error LNK2001: unresolved external symbol _alloca This is in cygwin1.dll. As a quick hack, write an alloca() function that simply calls malloc(). it will leak, but it should work until you can either find alloca for MSVC, or figure out how to avoid the call to alloca() in the first place. > st.tab.obj : error LNK2001: unresolved external symbol _yyerror You normally need to provide one of these; this is how parse errors are returned to your program. libbison.a would provide a dummy version for you, but it's no big deal to add one to your program - even right in the .y file. > libfl.a(libmain.o) : error LNK2001: unresolved external symbol ___main This is because libfl.a was built with gcc, and provides a default main(), which expects cygwin's runtime support. You'll need to write your own main() function.