VS2008 project compiled with non-debug Qt-libs crashes
Hello Qt-guru's and others :)
I have created a program using Visual Studio 2008, Qt 4.6.2 and the Qt Visual Studio add-in 1.1.4. The program compiles and runs fine, but I recently noticed that the 'Release' version of my program still requires the debug-version of the Qt-dlls. So I set about correcting that :p
In the 'Linker' options of my project, I discovered that the settings for 'Additional Dependencies' under 'Input' was:
- qtmaind.lib
- qtcored4.lib
- qtguid4.lib
- qtnetworkd4.lib
- smft31.lib
As these Qt-libs are obviously the debug-versions, I removed the 'd' in the 4 of them and rebuilt the program. It crashes :confused:
This is the output VS2008 gives me:
Code:
'TestProg.exe': Loaded 'C:\Users\Wim\Documents\Visual Studio 2008\Projects\TestProg\bin\TestProg.exe', Binary was not built with debug
information.
'TestProg.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'TestProg.exe': Loaded 'C:\Users\Wim\Documents\Visual Studio 2008\Projects\TestProg\bin\QtCore4.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\user32.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\gdi32.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\advapi32.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\ole32.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\ws2_32.dll'
'TestProg.exe': Loaded 'C:\Windows\System32\nsi.dll'
'TestProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d\msvcp80.dll'
'TestProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d\msvcr80.dll'
Debugger:: An unhandled non-continuable exception was thrown during process load
The program '[1768] TestProg.exe: Native' has exited with code -1073741511 (0xc0000139).
I'm not an expert on Qt and Visual Studio, so I ask those who are: what can cause this and how do I repair it? What I think strange (at first glance) is the reference to msvcp80 and msvcr80 instead of '90'?
Any answers would be appreciated, though a solution would be most welcome ;)
Re: VS2008 project compiled with non-debug Qt-libs crashes
If your using the Qt plugin, compiling for release should be as simple as selected "Release" from the menu at the top of the screen. That certainly works for me. It also references MSCVR90.
Try emptying your release dir (after taking a backup, naturally). Maybe there are some stale files in there and this will force a complete rebuild.
Re: VS2008 project compiled with non-debug Qt-libs crashes
Quote:
Originally Posted by
fatjuicymole
If your using the Qt plugin, compiling for release should be as simple as selected "Release" from the menu at the top of the screen. That certainly works for me. It also references MSCVR90.
Try emptying your release dir (after taking a backup, naturally). Maybe there are some stale files in there and this will force a complete rebuild.
Hi fatjuicymole (what's in a name?),
I tried your suggestion; it was something I indeed had not tried before. It didn't help though...
Then I remembered something: there was an error too, stating something about 'not finding the ordinal .... in qtcore4.dll'. So I copied the qtcore4.dll from the installation folder to my project and voila: no more error :D
Thanks for your help so far. I think I have some other issues too, but I will make a new post for that (if I cannot solve it first :cool: ).
Regards,
V4Friend