Problems with running Release of Qt-Project
-
wrote on 11 Jul 2012, 10:11 last edited by
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.1Everything 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:
C:\QtSDK\mingw\bin\mingwm10.dll
C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin\QtCore4.dllIt still says that it couldn't find "??1QVariant@@QAE@XZ" in QtCore4.dll. Any suggestions how to get rid of this problem?
lg Christian
-
wrote on 11 Jul 2012, 10:43 last edited by
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...
-
wrote on 11 Jul 2012, 12:01 last edited by
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?
-
wrote on 11 Jul 2012, 12:10 last edited by
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.
-
wrote on 11 Jul 2012, 12:11 last edited by
ok, I will take a look into it. Thanks for your replies.
-
wrote on 11 Jul 2012, 12:16 last edited by
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...
-
wrote on 11 Jul 2012, 12:41 last edited by
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.
-
wrote on 11 Jul 2012, 12:47 last edited by
[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) -
wrote on 26 Jul 2012, 22:41 last edited by
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.