PDA

View Full Version : Mixing Debug and Release binaries



tonka3000
25th April 2013, 21:10
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

d_stranz
25th April 2013, 23:29
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.

tonka3000
28th April 2013, 18:29
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 :confused:

Thx for your answer.

Greetings
Tonka

amleto
28th April 2013, 19:12
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 :confused:

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

d_stranz
28th April 2013, 19:20
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.