[antlr-interest] antlr on Microsoft Visual C++ 6 ...

Benjamin B. benjamin.burkhart at navpos.de
Mon Mar 27 01:18:43 PST 2006


Hello everyone,

are there any tricks and intricacies concerning the usage of antlr on 
Microsoft Visual C++? The reason why I'm asking is that I'm getting 
loads of linker errors.

Linker arguments:
C:\Programme\antlr\lib\antlr.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib 
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib 
gdi32.lib winspool.lib comdlg32.lib advapi32.lib sh
ell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
/subsystem:console /incremental:no "/pdb:Release/antlr.pdb" 
/machine:I386 "/out:Release/antlr.exe"
.\Release\antlr.obj

The first few linker error messages:
libcp.lib(locale.obj) : error LNK2005: "public: static class 
std::locale::id std::num_put<char,class 
std::ostreambuf_iterator<char,struct std::char_traits<char> > >::id" 
(?id@?$num_put at DV?$ostreambuf_iterator at DU?$char_traits at D@std@@@std@@@std@@2V0lo
cale at 2@A) already defined in antlr.lib(CharScanner.obj)
libcp.lib(locale.obj) : error LNK2005: "public: static class 
std::locale::id std::numpunct<char>::id" 
(?id@?$numpunct at D@std@@2V0locale at 2@A) already defined in 
antlr.lib(CharScanner.obj)
antlr.obj : error LNK2001: unresolved external symbol "public: void 
__thiscall P::startRule(void)" (?startRule at P@@QAEXXZ)
antlr.obj : error LNK2001: unresolved external symbol "public: 
__thiscall P::P(class antlr::TokenStream &)" 
(??0P@@QAE at AAVTokenStream@antlr@@@Z)
antlr.obj : error LNK2001: unresolved external symbol "public: 
__thiscall L::L(class std::basic_istream<char,struct 
std::char_traits<char> > &)" 
(??0L@@QAE at AAV?$basic_istream at DU?$char_traits at D@std@@@std@@@Z)
antlr.lib(String.obj) : error LNK2001: unresolved external symbol 
"public: void __thiscall std::_String_base::_Xlen(void)const " 
(?_Xlen at _String_base@std@@QBEXXZ)
antlr.lib(BaseAST.obj) : error LNK2001: unresolved external symbol 
"public: void __thiscall std::_String_base::_Xlen(void)const " 
(?_Xlen at _String_base@std@@QBEXXZ)

The antlr is version 2.7.5, the msi packet, on Windows XP 2 with the 
mentioned development environment. And, to reduce confusion, this is a 
small trial project which I named "antlr".

Cheers and thanks
Benjamin


More information about the antlr-interest mailing list