[antlr-interest] Re: C++ parser
hombre at gmail.com
Thu Jun 3 10:30:35 PDT 2004
Assuming you are using a Unix-like system:
As a result, you will get your include and lib files somewhere under
/usr/local/. I'm not sure, but it's probably /usr/local/include/antlr
for the include files and /usr/local/lib for the libantlr.a file.
Anyway, assuming these are the locations, then do the following:
g++ -g -c -I/usr/local/include MyLangLexer.cpp
g++ -g -c -I/usr/local/include MyLangParser.cpp
g++ -g -o MyLang MyLangLexer.o MyLangParser.o -L/usr/local/lib -lantlr
Obviously, if you have a separate file with main, you'll have to
compile that also and include it in the link phase. But this should
get you going.
On Thu, 03 Jun 2004 17:20:11 -0000, geofuntasma <wardf at sympatico.ca> wrote:
> Well, I get too many errors that I cannot see the first lines. I tried
> to save that doing "gcc CPPParser.cpp >> errors" but ">>" doesn't seem
> to work with gcc.
> I believe if, as Ric suggest, only a path problem. I really dont know
> how to pass the path of the included antlr files to gcc, so I tried
> copying them to /usr/include/antlr/ (it didnt existed that directory
> so I created) but still not working.
> Any help would be very appreciated.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest