SmartWin und VC 2005 Express Edition
-
Hallo,
ich bin gerade dabei mal SmartWin auszuprobieren. Leider bin ich nicht allzuweit gekommen, schon beim bauen des ersten Hallo Welt Programms werde ich von Linker Errors erschlagen.
1>------ Erstellen gestartet: Projekt: smartwin2, Konfiguration: Release Win32 ------ 1>Verknüpfen... 1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "protected: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)const " (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : 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=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : 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)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : 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 *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : 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 &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) ist bereits in SmartWin.lib(Application.obj) definiert. 1>msvcprt.lib(MSVCP80.dll) : 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)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) ist bereits in SmartWin.lib(Application.obj) definiert. 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(locale0.obj) : 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 *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) ist bereits in msvcprt.lib(MSVCP80.dll) definiert. 1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a ist bereits in MSVCRT.lib(cinitexe.obj) definiert. 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z ist bereits in MSVCRT.lib(cinitexe.obj) definiert. 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a ist bereits in MSVCRT.lib(cinitexe.obj) definiert. 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z ist bereits in MSVCRT.lib(cinitexe.obj) definiert. 1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) ist bereits in MSVCRT.lib(MSVCR80.dll) definiert. 1>LINK : warning LNK4098: Standardbibliothek "MSVCRT" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden. 1>LINK : warning LNK4098: Standardbibliothek "LIBCMT" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden. 1>LIBCMT.lib(crt0.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "_main". 1>D:\Programmierung\C++\smartwin2\Release\smartwin2.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise. 1>Das Buildprotokoll wurde unter "file://d:\Programmierung\C++\smartwin2\smartwin2\Release\BuildLog.htm" gespeichert. 1>smartwin2 - 39 Fehler, 2 Warnung(en)
Zu den Projekteinstellungen:
- erstellt mit Neu -> Projekt -> Win32 Konsolenanwendung -> Anwendungstyp: Windows Anwendung (leeres Projekt)
- Unicode Support deaktiviert (Multi-Byte Zeichensatz)
- wird als Release Build gebaut
- Laufzeittypinfo aktivieren ist an (/GR, laut SmartWin Doku muss das wohl an sein)
- Zusätzliche Abhängigkeiten: smartwin.libIch hab auch schon versucht, wie in den letzten Zeilen der Fehlermeldung die Bibiotheken vom Build auszuschließen, aber dann mekert der Linker über teilweise nicht aufgelöste Abhängigkeiten...
Wäre echt net, wenn mir einer helfen könnte...
-
Statische Runtime vs. DLL Runtime.
Du musst alles was du zusammenlinken willst mit der gleichen Runtime bauen.
-
Hmm, und wie kriege ich das hin?
Mir war bis jetzt noch nicht bewusst, dass ich versucht habe das mit verschiedenen Runtimes zu bauen...