[antlr-interest] How to make Antlr2.7.2 working with VC6

Jibin Han jibin.han at xilinx.com
Sun Mar 2 10:13:26 PST 2003


Hi,
    I followed a tutorial, "How to get started with Antlr and VC++ 6.0."
at http://www.imada.sdu.dk/~morling/issue1.htm to make Antlr working
with VC6. I downloaded 2.7.2 instead of the 2.7.1 mentioned in the
tutorial and my JDK is 1.3.
    First, in setting CLASSPATH, I do not see such file in my JDK, <JDK
path>\lib\classes.zip, but I added it anyway.
    Then in compiling the Antlr source code, I think there maybe some
directory structure difference between 2.7.1 and 2.7.2, but I add the
source code from <antlr2.7.2>\lib\cpp\src and headers from
<antlr2.7.2>\lib\cpp\antlr to the VC project, The problem is when I
build it, there are 4 errors,

h:\antlr-2.7.2\lib\cpp\src\baseast.cpp(312) : error C2201: 'nullASTptr'
: must have external linkage in order to be exported/imported
h:\antlr-2.7.2\lib\cpp\src\token.cpp(18) : error C2720: 'badToken' :
'__declspec(dllimport ) ' storage-class specifier illegal on members
h:\antlr-2.7.2\lib\cpp\src\token.cpp(18) : error C2491:
'Token::badToken' : definition of dllimport static data member
h:\antlr-2.7.2\lib\cpp\src\treeparser.cpp(39) : error C2491:
'TreeParser::ASTNULL' : definition of dllimport static data member not
allowed

    Could you point me what's wrong here?
    Is there somewhere a tutorial for Antlr2.7.2 and VC6?

Thanks!



 

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



More information about the antlr-interest mailing list