[antlr-interest] Re: C++ parser
Tom Verbeure
hombre at gmail.com
Thu Jun 3 10:30:35 PDT 2004
Assuming you are using a Unix-like system:
configure --prefix=/usr/local
make
make install
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:
To compile:
g++ -g -c -I/usr/local/include MyLangLexer.cpp
g++ -g -c -I/usr/local/include MyLangParser.cpp
To link:
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.
Tom
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.
>
> Ward.
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list