[SOLVED] Making first program in Qt Creator 3.0.1
-
Hello i’m new to QT and I am not able to make a program that can be executed out of Qt Creator environment.
I am using Qt Creator 3.0.1 Based on Qt 5.2.1 (MSVC 2010, 32 bit) Built on Jan 31 2014 at 05:16:27.
I have problem with runing program out of Qt Creator environment. When I try to execute
the exe code, that is located in debug submap, I get a message "The program can't start because Qt5Cored.dll is missingfrom your computer."I thought the QT Creator will automatically build a code that can be executed on another computer but it seems I'm wrong. What should I do to make it work?
Thanks in advance, Igor
-
For runnig on another PC, you need to follow the "deployment guide":http://qt-project.org/doc/qt-5/windows-deployment.html.
-
-
You do not need configure for deployment. Again, please follow the guide. You need to skip "Static libraries" and go straight to "Shared Libraries".
-
I tried to follow the guide. In "Linking the Application to Qt as a Shared Library " are those instruction:
nmake clean
qmake -config release
nmakeI don't have nmake. I tried with mingw32-make instead. But it says: *** No rule to make target 'clean'. Stop.
And then qmake says that it has just two modes: -project and -makefile and instruction "qmake -config release" does nothing.
What am I doing wrong?
-
As sierdzio pointed out I would take sometime to read paciently the documentation for a proper configuration of Qt creator and the environment.
Your problem is happening because the mingw bin directory is not listed in your PATH environment variable.
I could point you 2 possible solutions:
1.) Set the location of YOUR mingw binary directory in the Path environment variable (mine is C:\Qt\5.2.1\mingw48_32\bin):
run the Windows CMD command line as Administrator
@set PATH=%PATH%;C:\Qt\5.2.1\mingw48_32\bin@You may then need to reboot the system or start your application from the command line.
2.) Second solution would be to copy the needed Qt dll's from your mingw binary directory to the directory where your application (exe) is located. To know what dll's to copy you may use dependency walker (www.dependencywalker.com) or just copy one by one and execute the application inbetween to see which dll is still missing!
Hope that helps.
Cheers,
Marc -
Hi,
Just build your application in release mode from Qt Creator, it's way simpler.
Also take a look at this "wiki entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows