Program crash outside Qt Environment
-
Hello.. I have made a little calculator program on Windows 7 64, using QtCreator with Qt 5.1.1. My problem is, when im moving my files from the "Release" folder, and copying the necessary dll´s, the program won´t start but pops up with a typical crash message including a "Memmory address" code like this "0xc000007b". Do í need to configure something in QtCreator or is it something im missing? I´m using the version with VC2012 compiler.
If you need anything like snippets just tell me, i will provide it. But i don´t think there is anything wrong with the code.
-
Hi,
Did you had a look at "Windows development guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html ?
-
Yes, and i tried that again, but it will not make any exe file when typing qmake -config relase. Is it correct, to open 2 command prompts, 1 for VS2012 developer console and QtCreators own command prompt? In the first one, i can use nmake, and in the Qt one nmake doesn´t exist but qmake does..
-
[quote author="Cannabis2011" date="1382824564"]Yes, and i tried that again, but it will not make any exe file when typing qmake -config relase. Is it correct, to open 2 command prompts, 1 for VS2012 developer console and QtCreators own command prompt? In the first one, i can use nmake, and in the Qt one nmake doesn´t exist but qmake does.. [/quote]
You can make your release from within Qt creator. There is no need to start qmake from outside even though it should work of course.Switch in Qt creator release mode in the left bar above the run and debug buttons. When you have switched to release mode, it may be of advantage to rerun qmake from Qt creator and then a build.
When using MinGW you need to copy the exe with all the dependent dlls to another folder or another computer and you are ready to go. With MSVC I am not sure, but the guides you give you details.
-
Currently i have no debugger installed or set up. So the only option is to compile in release mode. I had moved all the files from the release folder to a new folder with all the necessary dll´s.. But the app wont start , instead it pops up with a typical crash report with a code (Memmory address if that´s correct)..
-
By the way im using MSVC.. Is this the problem? Should i use MinGW instead??
-
[quote author="Cannabis2011" date="1382874648"]Currently i have no debugger installed or set up. So the only option is to compile in release mode. I had moved all the files from the release folder to a new folder with all the necessary dll´s.. But the app wont start , instead it pops up with a typical crash report with a code (Memmory address if that´s correct).. [/quote]
AFAIK you should be able to compile in debug mode even when no debugger is installed. Certainly, you cannot use the debugger then. The green triangle (or ctrl+R) on the left should start the application without debugger. The triangle below with the bug atop shall not work.
However, regardless you can do a release compile directly from Qt creator and also use green triangle, when it says release above it.[quote author="Cannabis2011" date="1382875257"]By the way im using MSVC.. Is this the problem? Should i use MinGW instead?? [/quote]
I think it should be a general problem. Personally, I have changed from msvc (as IDE and compiler) to Qt creator with MinGW. I never tried to use the mixture of Qt creator and vc compiler.If it is not a big issue for you to use MinGW, it is certainly worth to try. I have found a couple of issues with my code when switching compilers. Memory address problems are sometimes easier to get hold of when using a debugger. At least you know where to search.
-
I actually tried with minGW with the same result.. I will try to reinstall with minGW later afternoon.. Maybe it´s something i missing.. Dependency complain about dcomp.dll and some other dll´s that i think relates to windows 8.. but im not sure..
-
I now got it to work. I changed to MinGW and replaced all of the dll´s from the new installation, and added some new ones to. Now it works like a charm.
Thanks for your help, i was really scratching my neck here, but i finally got it to work.