[antlr-interest] Getting linker errors while building the ANTLR generated sources.

Jim Idle jimi at temporal-wave.com
Tue Sep 23 08:04:52 PDT 2008


On Mon, 2008-09-22 at 22:48 -0700, Arik Ter-Galstyan wrote:

> Markus and Jim thanks a lot for response. 
> 
> Jim,
> 
> it's not me trying to link the LIBCMT.lib with antlr.lib but the VS2008 on it's own tries to link them together.

The project you are using to compile and link the generated code is
doing it. So, right click on your project and select properties, C/C++,
code generation, Runtime Library, "Multi-threaded {Debug} DLL (/MDd).
Use teh Debug version fo rhte Debug target of your [rpject and the
Release version for the Release target of your project.




>  I think that the ANTLR generated source files contain some function which refer to both libs. 


That's not how it works.

> When I'm trying to exclude one of the conflicting libs from linking process then I get an "Unresolved external symbol" type of link error. 



> Also, please tell me how can I change the project to use MSVCRT ?  

You need to read the documentation for VS2008 projects.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080923/cef5aa0e/attachment.html 


More information about the antlr-interest mailing list