정적 라이브러리를 디버깅하는 방법을 배우려하고 있는데 특히 JsonCpp을 수정하려고합니다.정적 라이브러리를 수정하는 방법은 무엇입니까?
나는 Visual Studio에서 출력 창에 링크되는 정확히 상황을 확인하는 데 사용할 수 있습니다 어떤 프로젝트 설정?
============================================== ====================
여기에 오류가 있습니다 :
Error 1 error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" ([email protected]@@[email protected]) already defined in libcpmtd.lib(xlock.obj) msvcprtd.lib
Error 2 error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" ([email protected]@@[email protected]@Z) already defined in libcpmtd.lib(xlock.obj) msvcprtd.lib
Error 3 error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" ([email protected]@@[email protected]) already defined in libcpmtd.lib(stdthrow.obj) msvcprtd.lib
Error 4 error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) already defined in Core.obj msvcprtd.lib
Error 5 error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) already defined in Core.obj msvcprtd.lib
Error 6 error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) already defined in Core.obj msvcprtd.lib
Error 7 error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " ([email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@QBEPBDXZ) already defined in Core.obj msvcprtd.lib
Error 8 error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " ([email protected]_Container_base[email protected]@@QBEXXZ) already defined in Core.obj msvcprtd.lib
Error 9 error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" ([email protected]@@[email protected]) already defined in Core.obj msvcprtd.lib
Error 10 error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" ([email protected]@@[email protected]) already defined in Core.obj msvcprtd.lib
Error 11 error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) already defined in libcpmtd.lib(locale0.obj) msvcprtd.lib
Error 12 error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(unsigned int,char)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) already defined in Serialization.obj msvcprtd.lib
Error 13 error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " ([email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@QBEIXZ) already defined in Core.obj msvcprtd.lib
Error 14 error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in Serialization.obj msvcprtd.lib
Error 15 error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" ([email protected][email protected]@[email protected]@[email protected]) already defined in Serialization.obj msvcprtd.lib
Error 16 error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" ([email protected][email protected]@[email protected]@SAHXZ) already defined in Serialization.obj msvcprtd.lib
Error 17 error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" ([email protected][email protected]@[email protected]@[email protected]) already defined in Core.obj msvcprtd.lib
Error 18 error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj) MSVCRTD.lib
Error 19 error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj) MSVCRTD.lib
Error 20 error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" ([email protected]@@[email protected]) already defined in LIBCMTD.lib(stdexcpt.obj) MSVCRTD.lib
Error 21 error LNK2005: "public: __thiscall std::exception::exception(void)" ([email protected]@@[email protected]) already defined in LIBCMTD.lib(stdexcpt.obj) MSVCRTD.lib
Error 22 error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" ([email protected]@@[email protected]@@Z) already defined in LIBCMTD.lib(stdexcpt.obj) MSVCRTD.lib
Error 23 error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj) MSVCRTD.lib
Error 24 error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj) MSVCRTD.lib
Error 25 error LNK2005: __CrtDbgReportW already defined in LIBCMTD.lib(dbgrptw.obj)
MSVCRTD.lib
Error 26 error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" ([email protected]@@[email protected]@Z) already defined in LIBCMTD.lib(stdexcpt.obj) MSVCRTD.lib
Error 27 error LNK2005: _memmove_s already defined in LIBCMTD.lib(memmove_s.obj) MSVCRTD.lib
Error 28 error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj) MSVCRTD.lib
Error 29 error LNK2005: _sprintf_s already defined in LIBCMTD.lib(sprintf.obj) MSVCRTD.lib
Error 30 error LNK2005: _strpbrk already defined in LIBCMTD.lib(strpbrk.obj) MSVCRTD.lib
Error 31 error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMTD.lib(typinfo.obj) MSVCRTD.lib
Error 32 error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in LIBCMTD.lib(typinfo.obj) MSVCRTD.lib
Warning 33 warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library Afterfuture Game Engine
Error 34 fatal error LNK1169: one or more multiply defined symbols found C:\Users\Blake\Desktop\Afterfuture\Afterfuture Game Engine\Debug\Afterfuture Game Engine.exe
이 정적 라이브러리 수정의 요지는 무엇입니까? 나는 근원을 고칠 수있다. –
그런 다음 프로젝트를 사용하는 것과 동일한 표준 C 라이브러리를 사용하도록 컴파일하고 같은 방법으로 연결하십시오. 프로젝트가 멀티 스레드 릴리스 표준 C 라이브러리에 동적으로 링크하는 경우 동일한 방식으로 링크하도록 라이브러리를 다시 컴파일하십시오. (내 마지막 단락의 두 번째 문장을 참조하십시오.) –
내 질문에 대답하는 방법을 정말 볼 수 없어, 귀하의 배려 감사하지만 그냥 정적 라이브러리를 빌드하는 데 사용 된 소스 디버깅 방법을 찾고 있습니다. 두 개의 프로젝트가 있습니다. 하나의 프로젝트는 내 주요 실행 파일이고 다른 하나는 (내 실행 프로젝트에서 사용되는) 정적 라이브러리입니다. –