Problems with running Release of Qt-Project

  • I started to programm a GUI-Project with Qt Creator. I installed the latest Version on my Windows 7 64 bit:

    Qt Creator 2.4.1
    Based on Qt 4.7.4 (32 bit)
    Qt SDK from 4.7.1 to 4.8.1

    Everything went fine (debugging on Qt Creator and running on it), but when I built a release executable and tried to run it, I got an error concerning QtCore4.dll. I also found lots of solutions in the internet, but none of them worked. Even when I use command prompt (Qt 4.8.1 for Desktop MinGW) and entered "qmake" and "mingw32-make" nothing worked. I also copied the following files into my release directory:


    It still says that it couldn't find "??1QVariant@@QAE@XZ" in QtCore4.dll. Any suggestions how to get rid of this problem?

    lg Christian

  • The QtGui4.dll is also needed along with QtCore4.dll ... Also, they need to be in the directory where the executable is... See if that works...

  • It works, thanks. That leads me to the next Question:

    Do I always need just mingwm10.dll, QtCore4.dll and QtGui4.dll to run a release or are there times where I also need other DLL-Files?

  • It depends on the modules of Qt you use. QtCore contains the basic parts, like QObject, QCoreApplication, QString and the containers. QtGui contains the components you see on the screen, like QWidget and things derived from it, and things like QIcon. If you use other components, you will also need other libraries: networking, XML (except QXmlStream*, those are in the core library), sql, etc. There is an overview of the modules in the documentation.

  • ok, I will take a look into it. Thanks for your replies.

  • you only need QtCore and QtGui dll's(the mingw dll should not be required)... apart from that, if you use special modules(like QtWebKit, Phonon, etc.), then you might need their specific dll's... i haven't used them so i don't know... I have only required QtCore4.dll and QtGui4.dll so far in whatever i have tried...

  • mingw dll is required if you compiled with that compiler. There are two .dll's to distribute in this case, but I don't off the top of my head remember the second one.

    Note that it is possible to distribute without the separate .dll files, if you link against a static version of Qt. That one you'll have to build for yourself though, and there are both legal and technical limitations to what you can do.

  • [quote author="Andre" date="1342010512"]mingw dll is required if you compiled with that compiler.[/quote]
    I never needed them and I use MinGW... I think it compiles its dll in the executable in the release mode(not the Qt release mode, but mingw32-make -release when compiling)

  • As long as the mingw DLLs are in your PATH they are found automatically. But as soon as you want to deploy on a machine without MinGW installed, you will need them.

Log in to reply

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