This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Compiling Bison-generated parsers with MS VC++?
- To: "Christopher David Hundhausen" <chundhau at cs dot uoregon dot edu>, <gnu-win32 at cygnus dot com>
- Subject: Re: Compiling Bison-generated parsers with MS VC++?
- From: Gilles Depeyrot <Gilles dot Depeyrot at wanadoo dot fr>
- Date: Thu, 8 Oct 98 22:12:57 +0200
Hi Christopher,
I use several Bison/Flex parser/lexers in one of my Windows applications.
This should be absolutely no trouble since both Bison and Flex generate
portable C code. You do have to create an empty unistd.h include file
to get things to compile correctly.
Le (the) 7/10/98 18:04, Christopher David Hundhausen a écrit (wrote) :
>The next step is to get VC++ to compile a bison-generated parser that
>makes use of MFC classes. Does anyone have any suggestions on
>how to get this to work? At present, my compilation results in
>the following error messages:
>
>/cygnus/b19/share/bison.simple(327) : error C2065: 'yyerror' : undeclared
>identifier
>/cygnus/b19/share/bison.simple(333) : error C2065: 'alloca' : undeclared
>identifier
>/cygnus/b19/share/bison.simple(387) : error C2065: 'yylex' : undeclared
>identifier
SInce VC++ is a C++ compiler, both yyerror and yylex prototypes have to be
declared before they are used (at the top of the Bison grammar. I don't
recall having a problem with alloca, but I'll try to check that out.
>Once I get the parser to compile, what will I need to do to get
>everything to link properly with my MFC app? Is there a gnu-win32
>object file that I need to include in the link? Does anyone have any
>advice?
Since you are compiling with VC++, you don't need any Gnu-Win32 libraries.
The VC++ libraries contain all of the C entry points used by Bison and Flex.
Cheers,
Gilles
Gilles Depeyrot <mailto:Gilles.Depeyrot@wanadoo.fr>
<http://perso.wanadoo.fr/gilles.depeyrot>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".