View Full Version : Resources Modules DLL Window problem

11th October 2006, 12:05
We working on a bigger QT project with several programmers. We using a modular concept, with a framework (.exe) and several modules(.dll) that even can display their own windows (QWidgets, and the mainwindow from the .exe is the parent).

We also using the QT ressource concept (.qrc files).

Now, we wonna have Icons as static part (static linked) in the modules, that will be shown as part of several dialogs in the framework. So we exporting the icons as QIcons over our interfaces (i.e: long AddDevice(const QIcon & ico, const QString & DeviceName); callback from the module to the exe ... ).

If we compiling the .exe and the .dll with the same compiler settings (debug symbols or not) its just work. But if we have the framework and the modules compiled with different settings (framework as release, module as debug) we getting runtime assertions in the crt. (as soon as we wonna show the icon, in a list view for example)
Thats only happens, if we using the QIcons from the resources. It works fine without them, even if we using Interfaces that exporting QWidgets, QStrings and QDomNodes.

Its uncomfortable, because we need 2 complete different setups of our program ... and every developer have to deliver booth versions (release + debug) that the other developers can debug their own modules ....

DO anyone have the same problems ?
Is there a workauround to prevent the assertions ?

Compiler: MS VS 2005 pro
QT: 4.1.2 Enterprice
Windows: Xp SP2


13th October 2006, 22:12
In general you shouldn't mix release and debug code - it's not stable. Maybe you should redesign your development process so that code exchange between developers is easier (for example using some version control system like SVN), so that developers can compile the code themselves instead of depending on binaries given by other developers.

16th October 2006, 15:42
we just using cvs as version system ...

we have 4 programmers, and about 30 modules ...
a complete rebuild will cost about 2h of compiling on our maschines

Before migrating to QT we have worked with mfc, atl and even exported class definitions over our interfaces, and its worked quite good. Difficult to change this process now and explain it to the other developers and our manager ^^ But I have to try ....

Ciao ...

16th October 2006, 16:54
In normal conditions small changes to the source code should yield small compilation time, because only those files which were modified need to be recompiled again, so as long as you don't delete the build tree, you should only need to compile everything once. Then your build environment should only recompile small units of code and do the linking with previously built modules.

Your developers should understand the process and as for the manager, just tell him it'll improve efficiency because people won't have to pass the module binaries all over.