Important: Please read the Qt Code of Conduct -

Qt on 64 bit Window 7

  • My application is currently running on Linux 32 bit and Linux 64 bit. I am trying to get it to run on Window 32/64 bit. I ran into issues with my application not finding the mingw10.dll, Qtcore4.dll, etc.... I manually copied all the .dll files from Qt directories and things work. How can I overcome this without having to manually copy the .dll file to my application's directory?

  • Moderators

    Set PATH to include all the directories containing DLL files your application needs.

  • I have the following setting for my environmental PATH:

    QTDIR = C:\QtSDK\Desktop\Qt\4.8.1\mingw
    PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0,C:\QtSDK\mingw\bin,C:\QtSDK\Desktop\Qt\4.8.1\mingw\lib,C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin

    Am I missing something because it does not see mingw10.dll and all the other .dll file it needs when I try to run it.

  • I was able to get things to work. The above PATH was comma separated instead of semi-colon. That being said, when I run the application under release mode, the application loads fine. However, when I try to run it in debug mode, I get an error indicating the followimg:

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

    Any idea what is going on? Any help is very much appreciated!

  • I had this error using mingw-w64 cross-compiler on Fedora 18, and trying to run on Windows 7 64-bit. I needed to copy qwindows.dll from /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/platforms/ (but I just copied the whole plugins directory).

    Then I had to set QT_PLUGIN_PATH as an environment variable to point to the plugins directory, and finally my app ran. If you don't set QT_PLUGIN_PATH, you need the platforms directory to be in the same directory as your executable.

    Thanks to the #fedora-mingw IRC channel for help finding the above solution!

Log in to reply