Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt5Cored.dll is lost?



  • I built calqlatr under C:\Qt5\Examples\Qt-5.11.3\quick\demos successfully. I ran it well too using Qt Creator. But when I clicked the executable calqlatr.exe, I got message: unable to run this program, because your computer lost QtCored.dll. Please re-install it to fix this issue."

    What's wrong with it? I remember I installed it very smoothly. Do I need to spend several hours to re-install it? Or, any other simple way which I can fixed it easier.


  • Moderators

    You need to deploy the executable. See https://doc.qt.io/qt-5/windows-deployment.html



  • Hi @Stan-Huang , basically you need to package the .exe with few dll's, so when you click the .exe it basically searches for the dll's which it needs, when it does not find it, it will give you such errors, So do the following to fix it:-

    There is a tool windeployqt that can help you in finding the necessary dll's,once you find them, then copy all Qt dlls required for your .exe in the same folder where your .exe is present.



  • Hi
    @Stan-Huang said in Qt5Cored.dll is lost?:

    QtCored.dll.

    this is debug version dll, you need to switch to release build also (soneone correct me if im wrong).


  • Moderators

    @LeLev said in Qt5Cored.dll is lost?:

    Hi
    @Stan-Huang said in Qt5Cored.dll is lost?:

    QtCored.dll.

    this is debug version dll, you need to switch to release build also (soneone correct me if im wrong).

    Well you can deploy a debug build, it will work. But indeed, it is a much better idea to deploy release packages instead.



  • I have a deploy project (pri) for my app. We actually have a couple, one for Windows and one for Linux. We run these from the command line. windeployqt is really nice to use to grab all the dependencies including the QML files as needed. However, I caution running this on a debug build. It will suck in all the huge debug dlls that can be gigabytes in size. It will do it, but the deployable app will be huge.

    windeployqt is just one step in our deploy script as our script will actually call the installer builder as well. We use NSIS for that.


Log in to reply