[ENet-discuss] Visual Studio .NET linker errors

Brian Hook hook_l at bookofhook.com
Tue Aug 31 06:50:02 PDT 2004


This looks like you're using two different versions of the C run time 
library, often the result of specifying one run-time for your 
executable (e.g. Static Debug) and another for your libraries (e.g. 
DLL Debug Multithreaded).

Make sure that you have the same code generation options for all 
projects.  Looking at this it looks like you are linking to the static 
single threaded C RTL (MSVCRT.LIB) and the Multithreaded Debug C RTL 
(libcmtd.lib).  That's off the top of my head though, point being that 
those are two separate instances of the RTL and will result in linker 
collisions.

Brian

On Tue, 31 Aug 2004 03:34:51 -0500 (CDT), stu at evilx.com wrote:
> Hi-
>
> I'm trying to get the Enet library to work with a SDL based game
> I'm working on.  I can compile the library as a static library or
> DLL just fine but when I link to the library from my game I get the
> following linker errors.  This looks like something stupid that I'm
> over looking..
>
>
> Linking...
> LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
> '/OPT:ICF' specification
> libcmtd.lib(dbgheap.obj) : error LNK2005: _malloc already defined
> in MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(dbgheap.obj) : error LNK2005: _free already defined in
> MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(crt0dat.obj) : error LNK2005: _exit already defined in
> MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(crt0dat.obj) : error LNK2005: __exit already defined in
> MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(crt0dat.obj) : error LNK2005: __cexit already defined
> in MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(crt0dat.obj) : error LNK2005: __c_exit already defined
> in MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(winxfltr.obj) : error LNK2005: __XcptFilter already
> defined in MSVCRT.lib(MSVCR71.dll)
> libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_z already defined
> in MSVCRT.lib(cinitexe.obj)
> libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_a already defined
> in MSVCRT.lib(cinitexe.obj)
> libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_z already defined
> in MSVCRT.lib(cinitexe.obj)
> libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_a already defined
> in MSVCRT.lib(cinitexe.obj)
> libcmtd.lib(crt0.obj) : error LNK2005: _mainCRTStartup already
> defined in MSVCRT.lib(crtexe.obj)
> libcmtd.lib(crt0.obj) : error LNK2005: __amsg_exit already defined
> in MSVCRT.lib(MSVCR71.dll)
> MSVCRT.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined
> in libcmtd.lib(strncpy.obj)
> MSVCRT.lib(MSVCR71.dll) : error LNK2005: __isctype already defined
> in libcmtd.lib(isctype.obj)
> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of
> other libs; use /NODEFAULTLIB:library
> MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib
> 'libcmtd.lib' conflicts with use of other libs; use
> /NODEFAULTLIB:library Release/rastaisland.exe : fatal error
> LNK1169: one or more multiply defined symbols found
>
>
> -thanks
> jason





More information about the ENet-discuss mailing list