[antlr-interest] Getting linker errors while building the ANTLR generated sources.
Jim Idle
jimi at temporal-wave.com
Mon Sep 22 09:55:41 PDT 2008
On Mon, 2008-09-22 at 06:58 -0700, Arik Ter-Galstyan wrote:
> Getting the following linker errors while building the ANTLR generated Lexer and Parser sources with Visual Studio 2008. Target language is C++.
> In other words the antlr.lib conflicts with MS VS 2008 native libraries due to repeated definition of functions in both libraries.
>
> Any ideas ???
>
> >LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo already defined in MSVCRT.lib(MSVCR90.dll)
> 1>LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR90.dll)
>
>
If you want to use LIBCMT, then rebuild the ANTLR runtime libraries to
link with that. They are using MSVCRT by default (multi-threaded DLL).
Or, just change your project to use MSVCRT if you didn't specifically
mean to to use the static libraries with it.
Jim
>
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080922/9018b55a/attachment.html
More information about the antlr-interest
mailing list