id3lib in VC++ Express verwenden
-
Abend,
Ich habe mal wieder ein Problem damit eine Bibliothek richtig einzubinden:
die hier http://id3lib.sourceforge.net/Ich habe sowohl die id3lib im Debug und Release Modus kompiliert als auch die
zlib Library.Hab das ganze in den VC++ - Directories eingetragen
ID3LIB_LINKOPTION=1 in den Projekteingenschaften->Präprozessor hinzugefügt und die Libs bei zusätzlichen Abhängigkeiten eingetragen
Beim kompiliern dieses Quellcodes:
#include <id3/tag.h> int main() { ID3_Tag myTag("song.mp3"); return 0; };
kommen dann 38 Fehler, die darauf hinweisen, dass Dinge in Standardbibliotheken
schon definiert sind die in der Id3lib nochmal auftauchen, und mir raten die Defaultbilibliotheken zu ignoriern, womit dann aber die id3lib nicht klar kommtFehlermeldungen:
1>------ Erstellen gestartet: Projekt: test, Konfiguration: Debug Win32 ------ 1>Verknüpfen... 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) ist bereits in id3libD.lib(tag_parse.obj) definiert. 1>libcpmtd.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 msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.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 msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z) ist bereits in msvcprtd.lib(locale0_implib.obj) definiert. 1>libcpmtd.lib(locale0.obj) : error LNK2005: __Fac_tidy ist bereits in msvcprtd.lib(locale0_implib.obj) definiert. 1>libcpmtd.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 msvcprtd.lib(locale0_implib.obj) definiert. 1>libcpmtd.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 msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.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 msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) ist bereits in msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.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 msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) ist bereits in msvcprtd.lib(MSVCP90D.dll) definiert. 1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) ist bereits in msvcprtd.lib(MSVCP90D.dll) definiert. 1>LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(atox.obj) : error LNK2005: _atoi ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a ist bereits in MSVCRTD.lib(cinitexe.obj) definiert. 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z ist bereits in MSVCRTD.lib(cinitexe.obj) definiert. 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a ist bereits in MSVCRTD.lib(cinitexe.obj) definiert. 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z ist bereits in MSVCRTD.lib(cinitexe.obj) definiert. 1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup ist bereits in MSVCRTD.lib(crtexe.obj) definiert. 1>LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush ist bereits in MSVCRTD.lib(MSVCR90D.dll) definiert. 1>LINK : warning LNK4098: Standardbibliothek "MSVCRTD" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden. 1>LINK : warning LNK4098: Standardbibliothek "LIBCMTD" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden. 1>C:\..\test.exe : fatal error LNK1169: Mindestens ein mehrfach definiertes Symbol gefunden. 1>Das Buildprotokoll wurde unter "file://c:\...\BuildLog.htm" gespeichert. 1>sortieren - 38 Fehler, 2 Warnung(en) ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
Ich hab auch schon versucht die Bibliotheken einzeln zu ignoriern hat auch nix genutzt, hat irgendjemand noch eine idee was ich machen könnte?
-
Hallo,
du musst darauf achten, dass alle Bestandteile deines Projekts mit den gleichen Einstellungen für die Laufzeitbibliothek kompiliert wurden, siehe dazu:
http://www.c-plusplus.net/forum/viewtopic-var-t-is-221374.html
MfG,
Probe-Nutzer