Results 1 to 3 of 3

Thread: VS2008 project compiled with non-debug Qt-libs crashes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question 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

    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

    This is the output VS2008 gives me:

    Qt Code:
    1. 'TestProg.exe': Loaded 'C:\Users\Wim\Documents\Visual Studio 2008\Projects\TestProg\bin\TestProg.exe', Binary was not built with debug
    2.  
    3. information.
    4. 'TestProg.exe': Loaded 'C:\Windows\System32\ntdll.dll'
    5. 'TestProg.exe': Loaded 'C:\Windows\System32\kernel32.dll'
    6. 'TestProg.exe': Loaded 'C:\Users\Wim\Documents\Visual Studio 2008\Projects\TestProg\bin\QtCore4.dll'
    7. 'TestProg.exe': Loaded 'C:\Windows\System32\user32.dll'
    8. 'TestProg.exe': Loaded 'C:\Windows\System32\gdi32.dll'
    9. 'TestProg.exe': Loaded 'C:\Windows\System32\advapi32.dll'
    10. 'TestProg.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
    11. 'TestProg.exe': Loaded 'C:\Windows\System32\ole32.dll'
    12. 'TestProg.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
    13. 'TestProg.exe': Loaded 'C:\Windows\System32\ws2_32.dll'
    14. 'TestProg.exe': Loaded 'C:\Windows\System32\nsi.dll'
    15. 'TestProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d\msvcp80.dll'
    16. 'TestProg.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d\msvcr80.dll'
    17. Debugger:: An unhandled non-continuable exception was thrown during process load
    18. The program '[1768] TestProg.exe: Native' has exited with code -1073741511 (0xc0000139).
    To copy to clipboard, switch view to plain text mode 
    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

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  3. #3
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: VS2008 project compiled with non-debug Qt-libs crashes

    Quote Originally Posted by fatjuicymole View Post
    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

    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 ).

    Regards,

    V4Friend

Similar Threads

  1. Project file LIBS debug/release
    By bunjee in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2015, 06:42
  2. Compile Qt 4.6.2 with VS2008 - exception in release build, debug ok
    By LynneV in forum Installation and Deployment
    Replies: 0
    Last Post: 7th June 2010, 05:52
  3. Using libs built in VS2008?
    By laserbeak43 in forum Qt Programming
    Replies: 7
    Last Post: 16th November 2009, 02:17
  4. Qt project with .net parts(vs2008)
    By deemeetar in forum Newbie
    Replies: 0
    Last Post: 29th September 2009, 13:30
  5. Building debug version under VS2008
    By KenW in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd May 2008, 20:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.