[antlr-interest] Making c target work with c++

v r soth1985 at yahoo.com
Tue Jun 12 07:29:24 PDT 2007


When I compile an example from \examples-v3\C\C as c code everything works fine , but if i ish to compile it as c++(i just rename main.c to main.cpp ) i get errors
  Error 4 error LNK2019: unresolved external symbol "struct CParser_Ctx_struct * __cdecl CParserNew(struct ANTLR3_COMMON_TOKEN_STREAM_struct *)" (?CParserNew@@YAPAUCParser_Ctx_struct@@PAUANTLR3_COMMON_TOKEN_STREAM_struct@@@Z) referenced in function _main main.obj
Error 5 error LNK2019: unresolved external symbol "struct ANTLR3_COMMON_TOKEN_STREAM_struct * __cdecl antlr3CommonTokenStreamSourceNew(unsigned int,struct ANTLR3_TOKEN_SOURCE_struct *)" (?antlr3CommonTokenStreamSourceNew@@YAPAUANTLR3_COMMON_TOKEN_STREAM_struct@@IPAUANTLR3_TOKEN_SOURCE_struct@@@Z) referenced in function _main main.obj
Error 6 error LNK2019: unresolved external symbol "struct CLexer_Ctx_struct * __cdecl CLexerNew(struct ANTLR3_INPUT_STREAM_struct *)" (?CLexerNew@@YAPAUCLexer_Ctx_struct@@PAUANTLR3_INPUT_STREAM_struct@@@Z) referenced in function _main main.obj
Error 7 error LNK2019: unresolved external symbol "struct ANTLR3_INPUT_STREAM_struct * __cdecl antlr3AsciiFileStreamNew(unsigned char *)" (?antlr3AsciiFileStreamNew@@YAPAUANTLR3_INPUT_STREAM_struct@@PAE at Z) referenced in function _main main.obj
Error 8 fatal error LNK1120: 4 unresolved externals C:\antlr-3.0\examples-v3\examples-v3\C\Debug\C.exe 1
  so i wonder how to make all this work.

       
---------------------------------

Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070612/32d0c017/attachment.html 


More information about the antlr-interest mailing list