Uknown Linking Errors

Hi

I've a library that i'm using in a win32console application. When I try to compile this application, I get a list of errors. These errors are

Win32Console error LNK2005: "void __cdecl operator delete[](void *)" ( _V@YAXPAX@Z) already defined in LIBC.lib(delete2.obj)
Win32Console error LNK2005: ___CppXcptFilter already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: ___endstdio already defined in LIBC.lib(_file.obj)
Win32Console error LNK2005: ___initmbctable already defined in LIBC.lib(mbctype.obj)
Win32Console error LNK2005: ___initstdio already defined in LIBC.lib(_file.obj)
Win32Console error LNK2005: ___iob_func already defined in LIBC.lib(_file.obj)
Win32Console error LNK2005: __cflush already defined in LIBC.lib(_file.obj)
Win32Console error LNK2005: __dosmaperr already defined in LIBC.lib(dosmap.obj)
Win32Console error LNK2005: __First_FPE_Indx already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: __getmbcp already defined in LIBC.lib(mbctype.obj)
Win32Console error LNK2005: __iob already defined in LIBC.lib(_file.obj)
Win32Console error LNK2005: __isctype already defined in LIBC.lib(isctype.obj)
Win32Console error LNK2005: __Num_FPE already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: __setmbcp already defined in LIBC.lib(mbctype.obj)
Win32Console error LNK2005: __XcptActTab already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: __XcptActTabCount already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: __XcptFilter already defined in LIBC.lib(winxfltr.obj)
Win32Console error LNK2005: _fgetwc already defined in LIBC.lib(fgetwc.obj)
Win32Console error LNK2005: _getwc already defined in LIBC.lib(fgetwc.obj)
Win32Console error LNK2005: _raise already defined in LIBC.lib(winsig.obj)
Win32Console error LNK2005: _signal already defined in LIBC.lib(winsig.obj)
Win32Console fatal error LNK1169: one or more multiply defined symbols found

I'm dont know why am I gettings these errors or how to remove them. The library compiles just fine with no errors, but on using it in the application, the application wont compile.

Any idea!!

Regards

Usman



Answer this question

Uknown Linking Errors

  • bigkdogg

    You are probably mixing CRT models. If you are using VC2005, libc.lib no longer exists and hence you have to rebuild your library. Take a look at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=164683&SiteID=1 for more details.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • stu5601

    Looks as if your exe and dll are using different versions of the CRT (perhaps one is using the multi threaded version and the other one's using the single threaded one). Fix that and you should be ok.

  • Uknown Linking Errors