Visual Studio 2010 mit wxWidgets statisch linken



  • Hallo,

    ich versuche mit Visual Studio 2010 wxWidgets-Programme statisch zu linken. Diesem Tutorial bin ich gefolgt: http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide#Visual_Studio_C.2B.2B_2010. Wenn ich das Programm mit "Multi-threaded Debug DLL (/MDd)" kompiliere, kompiliert es, läuft aber nur mit "MSVCP100D.dll". Kompiliere ich es aber mit "Multi-threaded Debug (/MTd)" bekomme ich nur:

    1>------ Build started: Project: Test, Configuration: Debug Win32 ------
    1>Build started 20.03.2013 09:59:37.
    1>InitializeBuildStatus:
    1>  Touching "Debug\Test.unsuccessfulbuild".
    1>ClCompile:
    1>  All outputs are up-to-date.
    1>ResourceCompile:
    1>  All outputs are up-to-date.
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in minimal.obj
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in minimal.obj
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in minimal.obj
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) already defined in libcpmtd.lib(stdthrow.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)" (?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" (??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " (?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" (?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" (?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z) already defined in libcpmtd.lib(cout.obj)
    1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in libcpmtd.lib(cout.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcslen already defined in LIBCMTD.lib(wcslen.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: bool __thiscall type_info::operator!=(class type_info const &)const " (??9type_info@@QBE_NABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: bool __thiscall type_info::operator==(class type_info const &)const " (??8type_info@@QBE_NABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __CrtDbgReportW already defined in LIBCMTD.lib(dbgrptw.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswprint already defined in LIBCMTD.lib(_wctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswalnum already defined in LIBCMTD.lib(_wctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswalpha already defined in LIBCMTD.lib(_wctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswdigit already defined in LIBCMTD.lib(_wctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wcstol_l already defined in LIBCMTD.lib(wcstol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wcstoul_l already defined in LIBCMTD.lib(wcstol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcstol already defined in LIBCMTD.lib(wcstol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcstoul already defined in LIBCMTD.lib(wcstol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _iswspace already defined in LIBCMTD.lib(_wctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __CrtSetDbgFlag already defined in LIBCMTD.lib(dbgheap.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isalnum already defined in LIBCMTD.lib(_ctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isalpha already defined in LIBCMTD.lib(_ctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _isdigit already defined in LIBCMTD.lib(_ctype.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __open_osfhandle already defined in LIBCMTD.lib(osfinfo.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __get_osfhandle already defined in LIBCMTD.lib(osfinfo.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __fileno already defined in LIBCMTD.lib(fileno.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __close already defined in LIBCMTD.lib(close.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __read already defined in LIBCMTD.lib(read.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __write already defined in LIBCMTD.lib(write.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __commit already defined in LIBCMTD.lib(commit.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __lseeki64 already defined in LIBCMTD.lib(lseeki64.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __fseeki64 already defined in LIBCMTD.lib(fseeki64.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __ftelli64 already defined in LIBCMTD.lib(ftelli64.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _mbstowcs already defined in LIBCMTD.lib(mbstowcs.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _wcstombs already defined in LIBCMTD.lib(wcstombs.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _setlocale already defined in LIBCMTD.lib(setlocal.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __vswprintf already defined in LIBCMTD.lib(vswprint.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __vswprintf_p already defined in LIBCMTD.lib(vswprnc.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fputwc already defined in LIBCMTD.lib(fputwc.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strpbrk already defined in LIBCMTD.lib(strpbrk.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __create_locale already defined in LIBCMTD.lib(setlocal.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __free_locale already defined in LIBCMTD.lib(setlocal.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strtoul already defined in LIBCMTD.lib(strtol.obj)
    1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _ldexp already defined in LIBCMTD.lib(_ldexp_.obj)
    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>C:\Users\BluePhaz\Desktop\Test\Debug\Test.exe : fatal error LNK1169: one or more multiply defined symbols found
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:00.36
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    

    Preprocessor Definitions:
    _MBCS;%(PreprocessorDefinitions);WIN32;WINVER=0x0400;__WXMSW__;_WINDOWS;wxUSE_GUI=1;<different options>

    Additional Library Directories: $(WXWIN)\lib\vc_lib

    Additional Dependencies: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);wxmsw29ud_core.lib;wxbase29ud.lib;comctl32.lib;rpcrt4.lib;winmm.lib;advapi32.lib;wsock32.lib

    Was mach ich falsch?

    Mfg,
    BluePhaz



  • Bitte helft mir. Braucht ihr eventuell weitere Informationen?





  • An diese Guide hatte ich mich gehalten. Dann kommt es bei mir zu diesem Fehler.



  • *push*


Anmelden zum Antworten