MSVCRTD.lib 有关的错误

编译和DirectShow有关的程序时出现下列错误

1>Linking...
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>./Debug/TrackingMS.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:/Documents and Settings/vicky/桌面/meanshift/VideoTrack_code/MSTracking/Debug/BuildLog.htm"
1>TrackingMS - 3 error(s), 16 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

或者类似下列错误(the errors of "unresolved external symbol" appear when I ignore MSVCRTD.lib, which include wcsrchr and StringVPrintfWorkerA)

1>strmbasd.lib(wxdebug.obj) : error LNK2019: unresolved external symbol __imp__wcsrchr referenced in function "wchar_t * __cdecl wcsrchr(wchar_t *,wchar_t)" (?wcsrchr@@YAPA_WPA_W_W@Z)
1>strmbasd.lib(wxdebug.obj) : error LNK2019: unresolved external symbol __imp___vsnprintf referenced in function "long __stdcall StringVPrintfWorkerA(char *,unsigned int,char const *,char *)" (?StringVPrintfWorkerA@@YGJPADIPBD0@Z)

解决方法是

ignore the LIBCMTD.lib:Link->Input->Ignore specific library

 

你可能感兴趣的:(C++,windows)