user2052244
user2052244

Reputation: 318

Adding Library to Debug Config - QtCreator, VC Compiler

After adding the libmusicxml library to my project in QtCreator (using the VC 2012 Compiler) the project will compile using the release configuration not however using the debug configuration. In the linking phase a number of build problems concering unresolved external symbols occur.

Having read through other posts I realise that I have to link to the library for both configurations separately. I have tried adding the following variants to my .pro-file without any success.

The error messages look like

main.obj:-1: Fehler:LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual _thiscall MusicXML2::xmlreader::~xmlreader(void)" (_imp_??1xmlreader@MusicXML2@@UAE@XZ) referenced in function _main

I hope somebody can help me out, thanks in advance!

Upvotes: 3

Views: 777

Answers (1)

Tim Meyer
Tim Meyer

Reputation: 12600

In our projects we do it like this:

LIBS += -L$$PWD/../Libraries/libmusicxml-3.00-win32
win32 {
    CONFIG(debug, debug|release) {
        LIBS += -llibmusicxml2d
    } else {
        LIBS += -llibmusicxml2
    }
}
INCLUDEPATH += $$PWD/../Libraries/libmusicxml-3.00-win32/include

DEPENDPATH += $$PWD/../Libraries/libmusicxml-3.00-win32/include

Upvotes: 2

Related Questions