Programm crashes using Taglib

喜夏-厌秋 提交于 2019-12-25 04:26:11

问题


I am trying to use Taglib with Qt5.7. But my programm crashes:

The GDB process terminated unexpectedly (exit code 0).

Cannot continue debugged process: The program is not being run.

During startup program exited with code 0xc0000135

There did not seem to be any error messages while building Taglib.

*.pro file

QT += core
QT -= gui

CONFIG += c++11

TARGET = untitled2
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

TAGLIBDIR = $$quote(D:/D/Programmieren/Libraries/taglib)
INCLUDEPATH += $$quote( $${TAGLIBDIR}/include )
LIBS += -L$$quote($${TAGLIBDIR}/lib) -ltag

main.cpp

#include <QCoreApplication>    
#include <taglib/tag.h>
#include <taglib/fileref.h>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    TagLib::FileRef ref("D:/D/Media/Musik/Disturbed/The Sickness/Disturbed - Stupify.mp3");
    return a.exec();
}

Edit: I created Taglib-buildfiles using CMake-GUI and native MinGW-Installation since I did not manage to create them using Qt. My OS is Windows 10 x64 Education and I use Qt-Creator. I downloaded the latest Taglib-Release (1.11.1)

Why I cant create buildfiles using CMake: First some *dll-files where missing, i coud solve that by just copying the ones from native MinGW-Installation to QT-MinGW. Second I could not find any of the *exe-files desired by CMake so i could not change the path from native MinGW-Installation.

After rebuilding Taglib in debugmode I get this errors:

main.cpp:10: error: undefined reference to `_imp___ZN6TagLib8FileNameC1EPKc'

main.cpp:10: error: undefined reference to `_imp___ZN6TagLib7FileRefC1ENS_8FileNameEbNS_15AudioProperties9ReadStyleE'

main.cpp:11: error: undefined reference to `_imp___ZNK6TagLib7FileRef3tagEv'

main.cpp:11: error: undefined reference to `_imp___ZNK6TagLib6String9toCStringEb'

main.cpp:11: error: undefined reference to `_imp___ZN6TagLib6StringD1Ev'

main.cpp:10: error: undefined reference to `_imp___ZN6TagLib7FileRefD1Ev'

main.cpp:11: error: undefined reference to `_imp___ZN6TagLib6StringD1Ev'

main.cpp:10: error: undefined reference to `_imp___ZN6TagLib7FileRefD1Ev'

collect2.exe:-1: error: error: ld returned 1 exit status


回答1:


Solved it by using new version (5.8 instead of 5.7) of Qt.



来源:https://stackoverflow.com/questions/41131512/programm-crashes-using-taglib

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!