在Windows上将TagLib编译到Qt C项目中
我目前正试图通过使用Qt / C从C#转移并摆脱我的平台边界.
我在我的旧项目中使用TagLibSharp,但我现在正尝试使用此处找到的原始C源: http://developer.kde.org/~wheeler/taglib.html 我正处于一个受伤的世界,试图将其编译到我的应用程序中.大多数基于Linux的C对我来说是胡言乱语,我不知道如何使用Qt将这个库正确地包含到我的项目中.我正在使用Qt Creator完成我的大部分工作(我可能做的一切). 有谁能指点我一些有用的教程或指南?任何帮助我理解我甚至用这个来源做什么的东西都将不胜感激.我对C#和Windows编程有一个非常透彻的理解,但我对这些类型的开源项目所做的事情并没有很好的掌握. 谢谢! 编辑 – 答案在这里 Compiling static TagLib 1.6.3 libraries for Windows 一些较旧的编辑…… 我现在使用Qt编译TagLib,但遇到“未定义的引用”错误. *的.pro INCLUDEPATH += ../$${TARGET}/taglib-win32 LIBS += -L"..$${TARGET}taglib-win32" LIBS += -llibtag #It seems to want this to be a *.dll,not a *.a? DEFINES += TAGLIB_NO_CONFIG *的.cpp #include <tag.h> #include <fileref.h> ... //None of these work,even though they are similar to examples given in TagLib source. TagLib::FileRef f("03.flac"); TagLib::String test = f.tag()->album(); TagLib::FileName *n = new TagLib::FileName("test"); TagLib::FileRef *f = new TagLib::FileRef(); 以下是一些确切错误的示例: ./debugmythread.o:C:UsersjocullDocumentsMy DropboxCodeQTQtTrayTime-build-desktop/../QtTrayTime/mythread.cpp:20: undefined reference to `_imp___ZN6TagLib7FileRefC1ENS_8FileNameEbNS_15AudioProperties9ReadStyleE' ./debugmythread.o:C:UsersjocullDocumentsMy DropboxCodeQTQtTrayTime-build-desktop/../QtTrayTime/mythread.cpp:21: undefined reference to `_imp___ZNK6TagLib7FileRef3tagEv' ./debugmythread.o:C:UsersjocullDocumentsMy DropboxCodeQTQtTrayTime-build-desktop/../QtTrayTime/mythread.cpp:42: undefined reference to `_imp___ZN6TagLib6StringD1Ev' ./debugmythread.o:C:UsersjocullDocumentsMy DropboxCodeQTQtTrayTime-build-desktop/../QtTrayTime/mythread.cpp:42: undefined reference to `_imp___ZN6TagLib7FileRefD1Ev' collect2: ld returned 1 exit status 使用g的命令行步骤(Mac / Linux) > ./configure –enable-shared = false –enable-static = true
为了将来参考,请查看
this post.我已经概述了我是如何通过Windows 7 QtCreator编译TagLib的.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 通过Microsoft.AspNetCore.App元包简化程序集的引用
- windows – 如何导出/传输DHCP数据?
- XAML水平Stackpanel滚动
- Windows Containers 大冒险: 优化计划(Dockerfile)
- 在Windows 7上安装Python MySQLdb时出错
- windows – 如何在TortoiseSVN上查看锁定消息
- 如何在WDS部署的专门化传递期间运行PowerShell脚本?
- 在Windows Azure中扩展以获得IO性能
- Windows上禁用SSL V3需要重启吗? – 贵宾犬利用
- windows-phone-7 – Windows Phone多个应用实例