Results 1 to 5 of 5

Thread: Mixing Debug and Release binaries

  1. #1
    Join Date
    Jul 2012
    Location
    Austria
    Posts
    15
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Mixing Debug and Release binaries

    Hy@everybody,

    I have a problem mixing debug and release binaries. I have searched a lot - found many thread - but can't get a useable answer to my question.

    My Scenario:
    I have an QtApplication with an Plugin-System. The development of an new plugin works fine. I will ship my application (for the normal enduser) in a normal setup file (msi). For the developer i want to ship a api-setup which extend the normal installation with the api (*.h and *.lib) of the application to make it possible to develop plugins for my application. When i build the new plugin in release-mode all works well but when i build it in debug mode (most developer want debug their plugin ;-) ) i always got an error if i want to load the plugin (incompatible qt binaries - mixing debug and release) (the debug dll's are not shiped with the application).
    I don't really understand why this is happening.
    Is it possible to mix debug and release binaries?
    Shipping only release binaries and make it possible to debug new plugins is possible in many application. How they can combine this?

    Has anybody an smilar problem?

    My environment:
    Os: Win 7 x64
    Compiler: visual Studio 2010 SP1

    Greetings
    Tonka

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,022
    Thanks
    280
    Thanked 818 Times in 807 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Mixing Debug and Release binaries

    No, it is not possible to mix debug and release binaries on Windows using Visual Studio. The name mangling, layout of the virtual dispatch table and other things are different between release and debug builds, so it simply will not work. This is not related at all to Qt - it is true for any VC++ project.

    I think that in order to ship a "developer's kit" you will have to provide debug versions of all your DLLs and EXE.

  3. The following user says thank you to d_stranz for this useful post:

    tonka3000 (28th April 2013)

  4. #3
    Join Date
    Jul 2012
    Location
    Austria
    Posts
    15
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Mixing Debug and Release binaries

    Hey d_stranz,

    No, it is not possible to mix debug and release binaries on Windows using Visual Studio. The name mangling, layout of the virtual dispatch table and other things are different between release and debug builds, so it simply will not work. This is not related at all to Qt - it is true for any VC++ project.
    Good to know.
    I will release the debug dll's im my dev-kit to avoid my problem.

    I'm wondering that some software i use do not need to ship the debug dlls - it is created with visual studio and i check the dependencies with dependency walker - and my plugins are debugable

    Thx for your answer.

    Greetings
    Tonka

  5. #4
    Join Date
    Sep 2011
    Posts
    1,245
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mixing Debug and Release binaries

    Quote Originally Posted by tonka3000 View Post
    Hey d_stranz,



    Good to know.
    I will release the debug dll's im my dev-kit to avoid my problem.

    I'm wondering that some software i use do not need to ship the debug dlls - it is created with visual studio and i check the dependencies with dependency walker - and my plugins are debugable

    Thx for your answer.

    Greetings
    Tonka
    you are not allowed to distribute debug versions of microsoft c++ redistributables (they look a bit like msvcr*.dll).
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  6. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,022
    Thanks
    280
    Thanked 818 Times in 807 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Mixing Debug and Release binaries

    you are not allowed to distribute debug versions of microsoft c++ run times.
    Since the OP is creating a developer's kit that will permit others to build and debug plugins for his app, presumably those developers will already have the low-level run-time DLLs required to do that so it won't be necessary to redistribute them. And since they are required to use Qt, they will have the Qt DLLs, too. He only needs to distribute debug versions of his own DLLs / plugins.

    It is more important for him to make it clear that his platform is using MSVC, and that developers can't build plugins using another compiler.

Similar Threads

  1. Replies: 1
    Last Post: 10th October 2012, 08:46
  2. Debug / Release Problem
    By messifanboy in forum Newbie
    Replies: 8
    Last Post: 7th October 2009, 16:23
  3. Error with Debug Binaries
    By ashishrai in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2008, 00:51
  4. Why not on release but debug
    By baray98 in forum Qt Programming
    Replies: 6
    Last Post: 10th August 2007, 09:08
  5. Debug and Release
    By paranoid_android in forum Qt Programming
    Replies: 5
    Last Post: 18th November 2006, 13:58

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.