[antlr-interest] Unresolved externals building C executable

Gavin Lambert antlr at mirality.co.nz
Fri Jul 11 03:08:29 PDT 2008


At 21:37 11/07/2008, Artemus Ward wrote:
 >If I don't use /NODEFAULTLIB:MSVCRT then I get these errors
 >instead:
[...]
 >MSVCRT.lib(MSVCR90.dll) : error LNK2005: _free already defined 
in
 >LIBCMT.lib(free.obj)
 >MSVCRT.lib(MSVCR90.dll) : error LNK2005: _calloc already defined 

 >in LIBCMT.lib(calloc.obj)

Which means that you've probably set the ANTLR library to use the 
CRT DLL and the application to use the CRT statically.  They must 
agree with each other exactly if you're going to statically link 
them.



More information about the antlr-interest mailing list