   weird linking error in VC++
  ok I installed the boost library last night, and when I went to sleep my program was running fine.  I closed VC++ and when I reopened it this morning I got these linker errors whenever I tried to run my program.  I dont know if boost did it, it would be kind of weird if it did since I linked it to my project last night and had it work.  I searched google for this error (only found 1 or 2 identical errors) but every thread I found the problem was caused by multithreading or using a fortran-C mix neither of which Im doing.Linking...LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in LIBCMT.lib(malloc.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: __recalloc already defined in LIBCMT.lib(realloc.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)LIBCMTD.lib(dbgheap.obj) : error LNK2005: __msize already defined in LIBCMT.lib(msize.obj)LIBCMTD.lib(malloc.obj) : error LNK2005: _V6_HeapAlloc already defined in LIBCMT.lib(malloc.obj)LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in LIBCMT.lib(dbghook.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: __get_sbh_threshold already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: __set_sbh_threshold already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: __set_amblksiz already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: __get_amblksiz already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_init already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_find_block already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_free_block already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_block already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_region already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_group already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_resize_block already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heapmin already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_check already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_pHeaderDefer already defined in LIBCMT.lib(sbheap.obj)LIBCMTD.lib(isctype.obj) : error LNK2005: __isctype_l already defined in LIBCMT.lib(isctype.obj)LIBCMTD.lib(isctype.obj) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj)[Edited by - michael879 on June 17, 2006 12:47:15 AM]
  you are linking to 2 versions of the C runtime library. LIBCMTD.lib is the debug version, LIBCMT.lib is the release version. This normally happens when say, building your app in Debug, however you are linking to an external lib that was built in release mode (or vice versa).If that's not the case, then occasionally it can occur if debug and release build a lib with the same name (i always post-fix _debug to the debug exe's, lib's and dll's that i build to avoid this).   ;  ok so boost was probably built in release mode right? how do I fix this?   ;  right.. its definately not boost because I removed everything that uses boost in my program.  does anyone have any clue how to fix this?   ;  ^bump any help?   ;  Are you building your project in Debug or Release? Which libraries are you linking with? Can you list the compiler options? Configuration Properties -> C/C++ -> Command Line and Configuration Properties -> Linker -> Command Line (int VS.NET 2003) Without this information it's kind of hard to help.   ;  ok I was compiling in debug but switching to release fixed it.  Im linking to:Advapi32.lib shell32.lib gdi32.lib user32.lib d3d9.lib d3dx9.lib winmm.lib comctl32.lib dxguid.lib dxerr.libbut this all started when I installed the boost library.  Im not using any of their .lib files tho, only one of the template hpp files.my C/C++ command line:/O2 /I "C:\Documents and Settings\Michael\My Documents\Visual Studio 2005\Projects\Console" /I "C:\Program Files\Microsoft DirectX SDK (April 2006)\Samples\C++\Common" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"Release\\" /Fd"Release\vc80.pdb" /nologo /c /TP /errorReport:promptlinker command line:/OUT:"C:\Documents and Settings\Michael\My Documents\Visual Studio 2005\Projects\Particles\Release\Particles.exe" /NOLOGO /MANIFEST /MANIFESTFILE:"Release\Particles.exe.intermediate.manifest" /ERRORREPORT:PROMPT Advapi32.lib shell32.lib gdi32.lib user32.lib d3d9.lib d3dx9.lib winmm.lib comctl32.lib dxguid.lib dxerr.lib  kernel32.lib "..\..\..\..\..\..\..\program files\microsoft directx sdk (april 2006)\samples\c++\common\release\dxut.lib"   ;  sry that was release build, this is my command line options in debug:/O2 /I "C:\Documents and Settings\Michael\My Documents\Visual Studio 2005\Projects\Console" /I "C:\Program Files\Microsoft DirectX SDK (April 2006)\Samples\C++\Common" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"Debug\\" /Fd"Debug\vc80.pdb" /nologo /c /TP /errorReport:prompt   ;  It looks like your Debug configuration is using "Multi-thread" runtime library, "/MT" option. Change that to "Multi-thread debug" ("/MTd" option) or "Multi-thread debug DLL" ("/MDd" option).   