Taglib 未解决的外部问题 (FileRef)
因此,我尝试在我正在开发的项目中使用 taglib,但似乎无法克服一些未解决的外部问题。首先,我从 github 下载了最新的 taglib 版本,并继续遵循 中给出的答案在 Visual Studio 2010 中使用 TagLib。构建 taglib 后,我继续将以下路径添加到我的项目的 VS10 包含目录中:C:\code\libs\taglib; C:\code\libs\taglib\taglib; C:\code\libs\taglib\taglib\toolkit(请注意,我的 taglib 根目录已简单重命名为 taglib)。
执行此操作后,我尝试使用本页入门部分中的示例: http: //developer.kde.org/~wheeler/taglib/api/
所以我只是复制了第一行代码,尝试打开一个 FileRef:
TagLib::FileRef f("Latex Solar Beef.mp3");
使用该行并且代码中没有其余示例,VS2010 会抛出以下未解决的外部错误:
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TagLib::FileRef::~FileRef(void)" (__imp_??1FileRef@TagLib@@UAE@XZ) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileRef::FileRef(class TagLib::FileName,bool,enum TagLib::AudioProperties::ReadStyle)" (__imp_??0FileRef@TagLib@@QAE@VFileName@1@_NW4ReadStyle@AudioProperties@1@@Z) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileName::FileName(char const *)" (__imp_??0FileName@TagLib@@QAE@PBD@Z) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
我尝试过的事情:
- 所以我尝试了一个空的构造函数,只是为了看看我是否至少可以得到一个 void FileRef,这确实可以编译,但并没有真正的帮助。
- 手动将 taglib 文件夹中的每个目录添加到包含路径中,这没有任何改变。
- 从 taglib 站点和 github 进行多次重建。
此时,我认为这可能是我设置环境的方式有问题,但我不确定要发布什么内容。
任何帮助将不胜感激,
感谢您花时间阅读本文!
So I'm attempting to use taglib in a project I'm working on, and can not seem to get past a few unresolved externals. To start, I downloaded the latest taglib release from github, and proceeded to follow the answer given in Using TagLib in Visual Studio 2010. After building taglib, I proceeded to add the following paths to my VS10 include directories for my project: C:\code\libs\taglib; C:\code\libs\taglib\taglib; C:\code\libs\taglib\taglib\toolkit (note that my root directory for taglib was renamed simply to taglib).
After doing this I attempted to use the example in the getting started section of this page: http://developer.kde.org/~wheeler/taglib/api/
So I simply copied the first line of code, attempting to open up a FileRef:
TagLib::FileRef f("Latex Solar Beef.mp3");
With that line and none of the rest of the example in my code, VS2010 spits out the following unresolved external errors:
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TagLib::FileRef::~FileRef(void)" (__imp_??1FileRef@TagLib@@UAE@XZ) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileRef::FileRef(class TagLib::FileName,bool,enum TagLib::AudioProperties::ReadStyle)" (__imp_??0FileRef@TagLib@@QAE@VFileName@1@_NW4ReadStyle@AudioProperties@1@@Z) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
getFileInfo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TagLib::FileName::FileName(char const *)" (__imp_??0FileName@TagLib@@QAE@PBD@Z) referenced in function "void __cdecl tagLibTest(void)" (?tagLibTest@@YAXXZ)
Things I've tried:
- So I tried an empty constructor, just to see if I could at least get a void FileRef, and that does compile, but isn't really helpful.
- Manually adding every single directory in the taglib folder to the include paths, this changed nothing.
- Rebuilding multiple times from both the taglib site and github.
At this point I'm thinking it's likely a problem with the way I have my environment set up, but am not really sure what to post with regards to that.
Any help would be greatly appreciated,
Thanks for taking the time to read this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有同样的问题。我通过将 TagLib VS 解决方案的构建配置从“调试”更改为“发布”解决了这个问题。
I had the same issue. I resolved this by changing the Build Configuration of the TagLib VS Solution from Debug to Release.