Upgrade from Qt 5.5 to 5.12



  • Hello,

    I have an desktop application that is built with Qt 5.5 (static) and everything is fine. Now I want upgrade to Qt 5.12.2 because I want to use Visual Studio 2017 with msvc17 compiler. For that reason, I have built Qt (5.12.2) from source with the following command:

    C:\Qt\qt-everywhere-src-5.12.2>configure -static -prefix "C:\Qt\Qt5.12.2-static" -platform win32-msvc2017 -nomake examples -nomake tests -no-icu -opengl desktop -mp -qt-pcre
    

    My application uses a lib written by myself which already use Qt.

    During the build of my library there were some linker errors. For example:

    Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol _NetShareEnum@28 referenced in function "public: static bool __cdecl QFileSystemEngine::uncListSharesOnServer(class QString const &,class QStringList *)" (?uncListSharesOnServer@QFileSystemEngine@@SA_NABVQString@@PAVQStringList@@@Z)
    
    Qt5Networkd.lib(qnetworkinterface_win.obj) : error LNK2019: unresolved external symbol _GetAdaptersAddresses@20 referenced in function "class QList<class QNetworkInterfacePrivate *> __cdecl interfaceListing(void)" (?interfaceListing@@YA?AV?$QList@PAVQNetworkInterfacePrivate@@@@XZ)
    

    My lib has the following libraries as “Additional Dependencies” in Visual Studio registered:

    • qtmaind.lib
    • Setupapi.lib
    • Version.lib
    • Winmm.lib
    • Ws2_32.lib
    • Qt5Cored.lib
    • Qt5Concurrentd.lib
    • Qt5Networkd.lib
    • Qt5Xmld.lib
    • Qt5XmlPatternsd.lib
    • qtpcre2d.lib

    To fix the linker errors I add the following windows libs to dependencies:

    • Netapi32.lib
    • Userenv.lib
    • Iphlpapi.lib

    After that the linker errors for the own lib was gone. But this lead to another problem … after launching my application an error popup occur which said that the “api-ms-win-core-sysinfo-l1-2-0.dll” could not found. I have checked the result Exe of my application with the program “Dependency Walker”. And the result is that now my application tries to load some windows dlls which are not on the system or in the wrong version in the system. I guess I have added the wrong windows dll to the visual studio dependencies. Is there a list which windows libs Qt 5.12 needs? (changed here something compared to Qt 5.5?)
    Anybody see what the problem is?


Log in to reply
 

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