Results 1 to 10 of 10

Thread: How do I build a debug mode QT app that links to a lib built in release mode?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    you can built Qt with -debug-and-release configure key, that allows to use Qt in debug and release modes by adding CONFIG += release/debug flag in pro-file of your application.
    so, you need:
    configure.exe -debug-and-release
    mingw32-make (or nmake for MS VC)
    Last edited by spirit; 14th April 2009 at 09:23. Reason: reformatted to look better
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  2. #2
    Join Date
    Apr 2009
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    Quote Originally Posted by spirit View Post
    you can built Qt with -debug-and-release configure key, that allows to use Qt in debug and release modes by adding CONFIG += release/debug flag in pro-file of your application.
    so, you need:
    Qt Code:
    1. configure.exe -debug-and-release
    2. mingw32-make (or nmake for MS VC)
    To copy to clipboard, switch view to plain text mode 
    Thanks, I'll give that a try. Is there a way to do a clean before re-making or re-configing?

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    yup
    mingw32-make clean (or for MS VS: nmake clean)
    but you should run this command in QTDIR.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Apr 2009
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    Quote Originally Posted by spirit View Post
    yup

    but you should run this command in QTDIR.
    Thanks, QTDIR meaning c:\qt\2009.1\qt in my case?

    or the root, being c:\qt\2009.1 ?

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    Quote Originally Posted by Joachie View Post
    QTDIR meaning c:\qt\2009.1\qt in my case?
    yes, c:\qt\2009.1\qt.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. #6
    Join Date
    Apr 2009
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    Quote Originally Posted by spirit View Post
    you can built Qt with -debug-and-release configure key, that allows to use Qt in debug and release modes by adding CONFIG += release/debug flag in pro-file of your application.
    so, you need:
    Ok, I rebuilt as you suggested. So should all the libs now be using the non debug version of MSVCRT? Because the debug QT libs still appear to be using the debug version of MSVCRT.

  7. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: How do I build a debug mode QT app that links to a lib built in release mode?

    how do you know? did you use Dependency walker? use it on Qt libs which ending without "d".
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Difference between Debug and Release Mode
    By sunil.thaha in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2013, 14:31
  2. Dialog executes in debug build but not release
    By awhite1159 in forum Qt Programming
    Replies: 5
    Last Post: 24th June 2008, 18:51
  3. build debug with shared and release with static?
    By Thor28 in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2008, 23:32
  4. Need debug and release versions of Qwt?
    By Tiansen in forum Qwt
    Replies: 1
    Last Post: 28th March 2008, 08:55
  5. How to build in debug mode?
    By Weilor in forum Newbie
    Replies: 5
    Last Post: 15th February 2006, 15:02

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
  •  
Qt is a trademark of The Qt Company.