나는, 컴파일 링크 및 Visual Studio 지금은 이전의 가져 오는 동안 Visual Studio 2010에서 Visual Studio 2010로를로드 한 6으로 VisualStudio 6 : 이상한 링커 오류
와 잘 작동하는 DLL 프로젝트가 있습니다. dsp 파일 VS2010은 .vcxproj 파일로의 변환을 요청했습니다. 그 후 나는 새로 변환 된 프로젝트를 컴파일하지만 디버그 빌드에서이 이상한 링커 오류 우연히 발견하려고 :
error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: struct oapc_bin_head * const & __thiscall std::_Deque_const_iterator<struct oapc_bin_head *,class std::allocator<struct oapc_bin_head *> >::operator*(void)const " ([email protected][email protected]@[email protected][email protected]@@[email protected]@@[email protected]@[email protected]@XZ)
_DEBUG 컴파일 스위치가 디버그 모드뿐만 아니라 NDEBUG 아니라 릴리스 모드에서 정의된다. 놀랍게도 릴리스 모드에서 오류가 상당히 다릅니다 :
error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xlength_error(char const *)" ([email protected]@@[email protected]) referenced in function "protected: void __thiscall std::deque<struct oapc_bin_head *,class std::allocator<struct oapc_bin_head *> >::_Xlen(void)const " ([email protected][email protected][email protected]@[email protected][email protected]@@[email protected]@@[email protected]@IBEXXZ)
프로젝트 파일 변환 중에 손실 된 사항이 있습니까?
감사합니다.
이 답변이 도움이됩니까? http://stackoverflow.com/questions/6003368/unresolved-externals-in-c-when-using-vectors-and-find 및이 링크 http://forum.ragezone.com/f728/vs2010-packui-fix- 오류 -lnk2019-784831/ – Amitd
아니요, 죄송합니다. 도움이되지 않습니다. _DEBUG는 디버그 빌드에서 필수적이며, assert()가 존재하지 않으면 제대로 작동하지 않습니다. – Elmi
적어도 디버그 빌드 문제가 해결되었습니다 : msvcrtd.lib가 아닌 msvcrtd.lib와의 연결이 이루어져야합니다. – Elmi