Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Qt5 in Windows 7: Release build always call Qt5Cored.dll ??

  • Error information when run the Release build

    My coding environment is,

    Windows 7 64bits,
    Visual Studio 2013, Version 12.0.30501, Update 2
    CMake 3.3.2 / 2.8.11 (My design is for cross-platform and I have tried these two versions)
    My coding language is C/C++, Qt 5.4, VTK 6.1.0 (I don’t think this issue is relevant to VTK)

    After complied in the VS as Debug mode, it can be run as desired (both as Ctrl+F5 in VS and directly hit the .exe file in the output directory). However it can not be run after it is compiled as Release mode and propped the errors as the figure (call wrong DLL ?). I have checked the Windows environment variable and the path of Qt has already been added (otherwise the Debug version can’t be run neither).

    I have searched the both inside the StackOverFlow forum and in Google, and a large number of similar errors occurred (So I am wondering why not the Qt-project create a FAQ to address this problem), but most of them pointed out that the wrong path specified. I don’t know why the Release version calls the Debug DLLs (Actually both versions of DLLs/LIBs are in the same folders for “\Qt5.4.0\5.4\msvc2013_64_opengl”).

    The same code/CMake files work in the Linux/Ubuntu 14.04 64bits.

    Thank you in advance,

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Since you are using VTK, did you check that you are properly linking to the release version of VTK ?

    You can use a tool like Dependency Walker to take a look at what DLLs your application is trying to load.

    You should also avoid modifying the PATH environment variable on your machine, this could affect other applications using Qt.

  • @SGaist

    Thank you for your quick reply. According to your suggestion, I used Dependency Walker to find my application as Release buid indeed called the Debug lib of VTK. I have rebuilt the VTK and directly refered to the build directory (no installation of VTK), and this resolved the problem.

    Thank you,

  • Lifetime Qt Champion

    You're welcome !

    Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

Log in to reply