Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Failed to run application build with Qt 5.3 MinGW 4.8.2
I've just installed MinGW 4.8.2 32bit & Qt 5.3.0 MinGW 32bit packages.
From Qt Creator I've made a default Qt Widget Application.
It builds & runs successfully with Qt 5.2.0 MinGW 32bit.
Builds but fails to run with Qt 5.3.0 MinGW 32bit.
When lanched from Qt Creator it prints to Applicatoin Output panel: @
The program has unexpectedly finished.
When launched from Qt console the dialog box with the following message is displayed: @
The procedure entry point interlockedCompareExchange@12 could not be located in the dynamic link library.
My OS is Windows 8.1 (x64)
How can I fix the problem?
Hi, could it be "this bug":http://kaskavalci.com/?p=183
It doesn't look like it.
I run the application from Qt Creator and from Qt Console (qtenv2.bat). Thus the environment must be ok.
I don't understand the recommendation in that post:
"In order to solve this, please add your path to beginning of your Path variable."
What is "your path"? The directory where executable resides? If so, it doesn't help.
your path: the path to Qt's DLLs, e.g. C:\Qt\Tools\mingw482_32\bin
Anyway, because qtenv2.bat inserts the Qt path first, perhaps it's still something with the order of the directories in the path, you can try by opening a CMD window and not invoke qtenv2.bat, instead manually add Qt's path at the end, like this example:
Note: this is just a guess :-)
EDIT: he also makes another good recommendation, download "Dependency Walker":http://www.dependencywalker.com/depends22_x86.zip and open your .exe file with it
bq. instead manually add Qt’s path at the end
This dosn't help.
Dependency Walker reported "The system can not find the file specified" error for the following modules:
Hi, I get the same errors from Dependency Walker, they're false positives :-(
Anyway, googled a bit, turns out this error with the entry point interlockedCompareExchange@12 not found occurs because of "mixup of MingGW":http://lists.qt-project.org/pipermail/releasing/2013-September/001439.html libstdc++-6.dll
Try uninstall your MinGW 4.8 (that came with Qt 5.2), or make sure that your MinGW 4.82 (that comes with Qt 5.3) is first in the path.
EDIT: the errror is quite easy to reproduce: for example, I installed Qt 5.2 and Qt 5.3 on my Windows 8.1 machine, made a simple Qt 5.2 Widgets app, works fine with MinGW 4.8 but exhibits the same error "...interlockedCompareExchange@12..." when I instead use MinGW 4.82.
I've found the reason.
Qt Creator generated a kit "Desktop Qt 5.3.0 MinGW 32bit" which is connected to "MinGW 4.8" compiler instead of "MinGW 4.8.2".
Thus it build the application with a wrong compiler.
Unfortunatelly Qt Creator doesn't allow to modify settings for auto-generated kits.
Is it possible to force Qt Creator to connect Qt 5.3 to right compiler?
As a workaround I made a manual kit with right connection.
And it works!
Thanks for support!
venphil last edited by
The same thing happens in Windows 7 Professional SP1 - 64 bit (most recent updates applied). Using Qt 5.3.0 and mingw482_32.
venphil last edited by
Scratch last post. There were pieces of previous mingw dlls floating around in Windows/System32 and Windows/System64 folders. Removed them, and everything OK.
I face this issue too but I couldn't fix it although I follow your suggestions! Any way below the the procedures I've and I wish to get some help from you:
Error message on RUN (CTRL+R):
The program has unexpectedly finished.
[code]%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (x86)\Autodesk\Backburner;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Bazaar;C:\Program Files (x86)\WinMerge[/code]
Run from Qt console:
Qt console log:
[code]Setting up environment for Qt usage...
C:\Qt\Qt5.3.0\5.3\mingw482_32>cd /d C:\Users\mbnoimi\Desktop\build-TestQt530-5_3
werShell\v1.0;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (
x86)\Autodesk\Backburner;C:\Program Files (x86)\Microsoft SQL Server\100\Tools
Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Mic
rosoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Bazaar;C:\Program Files (
Dependency walker log after copying all Qt run-time into binary's path (C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug)
How can I fix this issue?
I forgot to mention that I'm using Qt 5.3.0 + Qt Creator 3.1.1 under Windows 8.1 x64
I tested the suggestion of e79ene as following but I got the same old results.
Hi, the ".. Bad Image" error I think is not a MinGW multiple versions problem, more likely is hard disk problem or virus :-(
Anyway, try switching your build to Release mode and see what happens.
[quote]Hi, the “.. Bad Image” error I think is not a MinGW multiple versions problem, more likely is hard disk problem or virus :-([/quote]
No this is incorrect because I get the same result for fresh installation on another PC using different OS (Win7 x86)
[quote]Anyway, try switching your build to Release mode and see what happens. [/quote]
I got same old result!
I filed a bug report in this link:
P.S. e79ene may you please modify the title of this thread by removing [SOLVED] tag
Hi, please don't file bugs on empty projects, your problem has nothing to do with Qt.
Post a screenshot when your app crashes, and download "Microsofts file checksum verififer":http://www.microsoft.com/en-us/download/details.aspx?id=11533 install it on the PC that Qt crashes on. Run the fciv.exe file on Qt5Widgets.dll and Qt5Widgetsd.dll files and post the results (32 hex digits for each file) here.
[quote]Hi, please don’t file bugs on empty projects, your problem has nothing to do with Qt.[/quote]
No. this is Qt issue because Qt 5.2.1 was working fine on same machines.
I formatted all my machines for new fresh windows and then installed Qt 5.3.0. The bug appeared on all that machines (all of them have different hardware and different Windows version) so this is absolutely Qt issue.
OMG, I discovered that the downloaded installer is corrupted (I didn't get any error message) so after downloading a new offline down loader everything went fine.
I'm very sorry for the big disturbance I made... thank you guys.