C++ 无法使用id3库链接示例程序

C++ 无法使用id3库链接示例程序,c++,hyperlink,id3,id3-tag,id3lib,C++,Hyperlink,Id3,Id3 Tag,Id3lib,我试图使用访问mp3标签,最终目的是从mp3音乐文件中访问唱片集艺术 问题是我甚至未能编译id3库附带的示例程序。 问题1。 尝试在我的项目中编译示例程序首先会产生此错误 1>*** NOTICE *** (not a real error) 1>* You should include a define in your project which reflect how you link the library 1>* If you use id3lib.lib or lib

我试图使用访问mp3标签,最终目的是从mp3音乐文件中访问唱片集艺术

问题是我甚至未能编译id3库附带的示例程序。 问题1。 尝试在我的项目中编译示例程序首先会产生此错误

1>*** NOTICE *** (not a real error)
1>* You should include a define in your project which reflect how you link the library
1>* If you use id3lib.lib or libprj/id3lib.dsp (you link static) you should add
1>* ID3LIB_LINKOPTION=1 to your preprocessor definitions of your project.
1>* If you use id3lib.dll (you link dynamic) you should add ID3LIB_LINKOPTION=3
1>* to your preprocessor definitions of your project.
当我尝试添加

#define ID3LIB_LINKOPTION 1
对于我的源文件,我得到了更多的错误

1>Linking...
1>msvcprtd.lib(MSVCP90D.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 id3lib.lib(tag_parse.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in id3lib.lib(tag_file.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) already defined in id3lib.lib(tag_parse.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) already defined in id3lib.lib(tag_parse.obj)

请帮帮我。我开始觉得自己是一个C++新手:(

< p>)不要链接到MSVCPR.D.LIB,它是默认的库,已经包含在ID3LIB LIB。
你肯定想在id3lib.lib中链接

我不明白,我明确链接到id3lib.lib,但我从未亲自链接到msvcprtd.lib。我不知道它是如何进入的。请澄清放弃:(.正在尝试Taglibit自动链接到默认库。有一个链接选项可以排除它。
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ID3_Tag::~ID3_Tag(void)" (??1ID3_Tag@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class ID3_Field & __thiscall ID3_Frame::Field(enum ID3_FieldID)const " (?Field@ID3_Frame@@QBEAAVID3_Field@@W4ID3_FieldID@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ID3_Frame::Contains(enum ID3_FieldID)const " (?Contains@ID3_Frame@@QBE_NW4ID3_FieldID@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class ID3_Frame * __thiscall ID3_Tag::Find(enum ID3_FrameID)const " (?Find@ID3_Tag@@QBEPAVID3_Frame@@W4ID3_FrameID@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall ID3_Tag::ID3_Tag(char const *)" (??0ID3_Tag@@QAE@PBD@Z) referenced in function _main
1>C:\Users\GuestUser\Documents\Visual Studio 2008\Projects\idlib example\Debug\idlib example.exe : fatal error LNK1120: 5 unresolved externals