[antlr-interest] MSVC 6 ANTLR build related question

Olivier Randriamanana olivier_randria at yahoo.com
Wed May 28 02:17:39 PDT 2003


Hello,

I'm a poor ANTLR 1st timer, and was a long way from
building an ANTLR 2.7.2 static lib with MSVC 6.0. I
have a couple of questions related to this. 

I've paid much attention to read the documentation and
used the workspace and project files in lib\cpp\MSVC,
and copied them in "lib\cpp\". However nothing went
well as the project file was not recognized by MSVC.
My first question: is it me/my distribution or did
everything work well for you out-of-the-tarball ?

I eventually used the files lib\cpp\MSVC-Dll. MSVC was
happy with the project file this time but I had to
recreate the hpp and cpp entries in the file groups.
Yet it did not compile because there were some
problems "external linkage needed for symbol to be
imported/exported". So I #define-ed ANTLR_EXPORTS in
the project settings, which fixed all error messages
but one, concerning the AST pointer declared at the
end of baseAST.cpp (I simply removed ANTLR_API in
front of it). 
My second question: are these the right things to do,
or do you have better modifications to suggest to get
things up and running ??

Thanks for your time and (hopefully) lights!

Olivier


I'm an ANTLR 1st timer. I've had troubles building
ANTLR as a static lib. Perusing the documentation, I
read I had to use the project/workspace files in
lib\cpp\MSVC, but MSVC did not recognize it as a
project file (why is still a mystery to me, any
idea??).

So I relied back on files in lib\cpp\MSVC-Dll. I had
to relocate the hpp & cpp files in the project, update
the include path, #define ANTLR_EXPORT, remove the
ANTLR_API qualifier in front of the pointer declared
at the end of baseAST.cpp to have the lib built (why
is still a mystery...

Does any of you had to do the same or did your
distribution built jsut fine right out of the tarball



I've tried to build ANTLR as a static lib using the
cpp\contrib\MSVC-Dll workspace & projects. Right out
of the tarball it did not build: the compiler
complained about variables and stuff not having
external linkage to be exported/imported. After
#defining ANTLR_EXPORT, the compiler only complained
about the pointer defined at the bottom of baseAST.cpp
which was prefixed with ANTLR_API. I fixed this by
removing ANTLR_API.

So here I my questions:
- did some of you had problems building ANTLR as I
did? ("MSVC is the problem" is not a valid answer :) )
- if so, did you do the same modifications to the
projects to have it up and running, or did you do
other more adequate ones ??
- the lib\cpp\ directory features a MSVC project file
that seems to be corrupted, my MSVC does not recognize
it, do you have the same problem ??

Thanks for your time and (hopefully) your responses.

, I had to #define  and
I've ran into compilation problems

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list