我正在尝试将TagLib library用于QT,但我遇到以下错误:
error adding symbols: DSO missing from command line
你知道什么是错误以及如何解决它?
感谢。
答案 0 :(得分:0)
您必须添加动态库的路径(DSO-Dynamic Shared Object),例如,如果您的dll-->(libName.dll)
或.so --> libName.so
将以下命令添加到.pro文件中:
INCLUDEPATH += "{1}"
LIBS += -L"{2}"
LIBS += -lName
其中:
1: Path of headers (.h files)
2: Path of the .dll file (Windows) or .so (Linux)
在我的情况下,文件位于:
/usr/lib/libtag.so
/usr/include/taglib
/usr/include/taglib/aifffile.h
/usr/include/taglib/aiffproperties.h
/usr/include/taglib/apefile.h
/usr/include/taglib/apefooter.h
/usr/include/taglib/apeitem.h
/usr/include/taglib/apeproperties.h
/usr/include/taglib/apetag.h
/usr/include/taglib/asfattribute.h
/usr/include/taglib/asffile.h
/usr/include/taglib/asfpicture.h
/usr/include/taglib/asfproperties.h
/usr/include/taglib/asftag.h
/usr/include/taglib/attachedpictureframe.h
/usr/include/taglib/audioproperties.h
/usr/include/taglib/chapterframe.h
/usr/include/taglib/commentsframe.h
/usr/include/taglib/eventtimingcodesframe.h
/usr/include/taglib/fileref.h
/usr/include/taglib/flacfile.h
/usr/include/taglib/flacmetadatablock.h
/usr/include/taglib/flacpicture.h
/usr/include/taglib/flacproperties.h
/usr/include/taglib/generalencapsulatedobjectframe.h
/usr/include/taglib/id3v1genres.h
/usr/include/taglib/id3v1tag.h
/usr/include/taglib/id3v2extendedheader.h
/usr/include/taglib/id3v2footer.h
/usr/include/taglib/id3v2frame.h
/usr/include/taglib/id3v2framefactory.h
/usr/include/taglib/id3v2header.h
/usr/include/taglib/id3v2synchdata.h
/usr/include/taglib/id3v2tag.h
/usr/include/taglib/infotag.h
/usr/include/taglib/itfile.h
/usr/include/taglib/itproperties.h
/usr/include/taglib/modfile.h
/usr/include/taglib/modfilebase.h
/usr/include/taglib/modproperties.h
/usr/include/taglib/modtag.h
/usr/include/taglib/mp4atom.h
/usr/include/taglib/mp4coverart.h
/usr/include/taglib/mp4file.h
/usr/include/taglib/mp4item.h
/usr/include/taglib/mp4properties.h
/usr/include/taglib/mp4tag.h
/usr/include/taglib/mpcfile.h
/usr/include/taglib/mpcproperties.h
/usr/include/taglib/mpegfile.h
/usr/include/taglib/mpegheader.h
/usr/include/taglib/mpegproperties.h
/usr/include/taglib/oggfile.h
/usr/include/taglib/oggflacfile.h
/usr/include/taglib/oggpage.h
/usr/include/taglib/oggpageheader.h
/usr/include/taglib/opusfile.h
/usr/include/taglib/opusproperties.h
/usr/include/taglib/ownershipframe.h
/usr/include/taglib/podcastframe.h
/usr/include/taglib/popularimeterframe.h
/usr/include/taglib/privateframe.h
/usr/include/taglib/relativevolumeframe.h
/usr/include/taglib/rifffile.h
/usr/include/taglib/s3mfile.h
/usr/include/taglib/s3mproperties.h
/usr/include/taglib/speexfile.h
/usr/include/taglib/speexproperties.h
/usr/include/taglib/synchronizedlyricsframe.h
/usr/include/taglib/tableofcontentsframe.h
/usr/include/taglib/tag.h
/usr/include/taglib/tag_c.h
/usr/include/taglib/taglib.h
/usr/include/taglib/taglib_config.h
/usr/include/taglib/taglib_export.h
/usr/include/taglib/tbytevector.h
/usr/include/taglib/tbytevectorlist.h
/usr/include/taglib/tbytevectorstream.h
/usr/include/taglib/tdebuglistener.h
/usr/include/taglib/textidentificationframe.h
/usr/include/taglib/tfile.h
/usr/include/taglib/tfilestream.h
/usr/include/taglib/tiostream.h
/usr/include/taglib/tlist.h
/usr/include/taglib/tlist.tcc
/usr/include/taglib/tmap.h
/usr/include/taglib/tmap.tcc
/usr/include/taglib/tpropertymap.h
/usr/include/taglib/trefcounter.h
/usr/include/taglib/trueaudiofile.h
/usr/include/taglib/trueaudioproperties.h
/usr/include/taglib/tstring.h
/usr/include/taglib/tstringlist.h
/usr/include/taglib/uniquefileidentifierframe.h
/usr/include/taglib/unknownframe.h
/usr/include/taglib/unsynchronizedlyricsframe.h
/usr/include/taglib/urllinkframe.h
/usr/include/taglib/vorbisfile.h
/usr/include/taglib/vorbisproperties.h
/usr/include/taglib/wavfile.h
/usr/include/taglib/wavpackfile.h
/usr/include/taglib/wavpackproperties.h
/usr/include/taglib/wavproperties.h
/usr/include/taglib/xingheader.h
/usr/include/taglib/xiphcomment.h
/usr/include/taglib/xmfile.h
/usr/include/taglib/xmproperties.h
所以我将按如下方式配置它:
INCLUDEPATH += "/usr/include/taglib"
LIBS += -L"/usr/lib/"
LIBS += -ltag
在我的代码中,我将包含以下库:
#include <aifffile.h>