During startup program exited with code 0xc0000005 problem with qt4 on Windows
I am working on a GUI multi platform application with qt4.7.4, the structure of my application is decomposed as below:
|- mainapp (app)
|- model ==> (LIB)
|- view ==> (LIB)
|- controller==> (LIB)
|- qwt ==> (LIB)
The program work and run normally on linux , but now i am trying to port it on Windows 7 (on windows i am using qt4.7.4 too with mingw),
**when i try to build it on windows , there is no problem **, but when i try to run it i have the following message
The program has unexpectedly finished.
and when i try to debug it i have the following error
During startup program exited with code 0xc0000005
i don't know why i am having that problem only in windows ?
Do have any idea , is that related to qwt dll or any other dll ,do i have to add the dll to path system on windows ?
Any suggestion for solving this problem is welcome !
if you use extra DLLs, try put them in build folder for test.
If you run it from creator and uses no extra dlls its something else.
Thank's for your reply,
Actually i am running the application from qt creator, and the only extra dll that i use is qwt , i tried to put qwt.dll on the build folder but i still have the same problem, do you have any other suggestion?
There is one intersting thing that i noticed , it's that when i tried to build an old version of the project before using qwt and i can run it without any problem , i suppose then that the problem is from the dll of qwt but i don't now how to detect it?
ok. So it does sound like the dll.
you could try with http://www.dependencywalker.com/
and see if it list qwt as missing.
(Run tool on your .exe in build folder)
In that case put DLL somewhere in PATH
and see if that helps.
This dll , did you compile it your self?
If possible , you could get qwt and compile a new DLL.
Sometimes name mangling can give issues if program and DLL uses different compilers.
Thank's for your fast reply, indeed i am compiling my dll myself inside my project with the same compiler used for the whole project,
But,when i use dependencywalker i can see (error opening file, invalid path) for the following dll:
and i am thinking that the problem is related to x64 arch for my windows 7
you can look here:
but for the moment i don't know how to solve it !
don't you have any idea?
Hmm. I think you are right.
Seems to be related to Visual studio "redistributable package."
But seems it can both be caused by having it installed and also not having it installed.
You could try to install the correct version for your compiler.
Should be part of VS install but some say its not.
Did you try all in that thread?
For the moment i didn't try all what the thread suggest, because i don't understand one thing ,
If the problem is really from visual , so why any other application work fine without any problem? :s
Yeah that is the odd part indeed. If it was from missing DLLs or something like that, it should also affect
You could try to make program run from build folder and see that way if just sort of like
Creator that wont work/start app with dll.
You need to copy dlls ( d versions if debug build) from c:\qt\vs20XX folder to build folder.
Also make a sub folder called platforms and copy from c:\qt\VS20xx\platforms folder
Last time I had the following ( for Release build)
29-06-2015 12:26 10.032.128 Qt5Guid.dll
13-10-2015 21:56 4.617.728 Qt5Core.dll
29-06-2015 12:25 4.862.976 Qt5Gui.dll
29-06-2015 12:33 4.418.560 Qt5Widgets.dll
15-10-2015 18:56 68.096 myplot.exe
05-10-2013 02:38 455.328 msvcp120.dll
21-10-2015 10:58 <DIR> platforms
05-10-2013 02:38 970.912 msvcr120.dll
Directory of E:\test\platforms
29-06-2015 12:36 991.232 qwindows.dll
The problem is solved,
The problem was caused by the difference between Qt SDK compiler and application compiler !
I recompiled the src of qt sdk with the compiler used to my program and now it work !