LNK2001 Error with XMP Toolkit static libraries



  • Hi,

    I am trying to compile an application written on MacOS X (not by me) on my windows machine. I am stuck with 43 LNK2001 Errors (see below), working the first time with Qt and the XMP Toolkit, I am not quite sure where to search for a solution. My .pro-File looks like this:

    @
    QT += core gui xml

    TARGET = XmpImporter
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    schemadefinition.cpp
    schemamapping.cpp
    databuilder.cpp
    sqlfilewriter.cpp
    importthread.cpp
    xmpparser.cpp

    HEADERS += mainwindow.h
    schemadefinition.h
    schemamapping.h
    databuilder.h
    sqlfilewriter.h
    importthread.h
    xmpparser.h
    xmpimporterapplication.h

    FORMS += mainwindow.ui

    INCLUDEPATH += externs/AdobeXmpToolkit/include
    INCLUDEPATH += externs/AdobeXmpToolkit/include/client-glue

    macx {
    LIBS += -Lexterns/AdobeXmpToolkit/libraries/macintosh/release -lXMPCoreStaticRelease -lXMPFilesStaticRelease
    LIBS += -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -F/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.6
    LIBS += -framework QuickTime -framework Carbon
    }

    win32{
    LIBS += -L$$PWD/externs/AdobeXmpToolkit/libraries/windows/Release -lXMPCoreStatic -lXMPFilesStatic
    }

    RESOURCES +=
    resources.qrc
    @

    I added the brackets for macx and win32, while the LIBS-configuration itselfs for macx is left as it was. I built both XMP-libraryfiles for release/static win32, and I can even use them to compile the toolkit's sample projects - so it does not seem like building the XMP-Toolkit causes the problem. I am using Qt Creator, Qt Version 4.8.5 and MV C++ Compiler 10 (x86).

    Any ideas how to fix this?

    The Qt Creator's output:

    @C:\Qt\qtcreator-2.8.1\bin\jom.exe -f Makefile.Release
    link /LIBPATH:"c:\Qt\4.8.5\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:"release\XmpImporter.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:release\XmpImporter.exe @C:\Users(###)\AppData\Local\Temp\XmpImporter.exe.7592.0.jom
    XMPCoreStatic.lib(WXMPMeta.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
    Creating library release\XmpImporter.lib and object release\XmpImporter.exp
    XMPFilesStatic.lib(XMPFiles.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl TXMPUtils<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::ApplyTemplate(class TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > ,class TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &,unsigned long)" (?ApplyTemplate@?$TXMPUtils@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@SAXPAV?$TXMPMeta@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@ABV2@K@Z)
    XMPFilesStatic.lib(XMPFiles.obj) : error LNK2001: unresolved external symbol "public: void __thiscall TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::SetErrorCallback(bool (__cdecl
    )(void *,unsigned char,long,char const *),void *,unsigned long)" (?SetErrorCallback@?$TXMPMeta@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QAEXP6A_NPAXEJPBD@Z0K@Z)
    XMPFilesStatic.lib(XMPFiles.obj) : error LNK2001: unresolved external symbol "public: class TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __thiscall TXMPMeta<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Clone(unsigned long)const " (?Clone@?$TXMPMeta@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@QBE?AV1@K@Z)
    (...)
    release\XmpImporter.exe : fatal error LNK1120: 42 unresolved externals
    jom: C:\XMP-Importer\Makefile.Release [release\XmpImporter.exe] Error 1120
    jom: C:\XMP-Importer\XMP-Importer\Makefile [release] Error 2
    16:05:12: Der Prozess "C:\Qt\qtcreator-2.8.1\bin\jom.exe" wurde mit dem Rückgabewert 2 beendet.
    Fehler beim Erstellen/Deployment des Projekts XmpImporter(Kit: Desktop)
    Bei der Ausführung von Schritt 'Make'@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.