Problem with Qt4 and release mode on windows

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Wed Nov 7 20:19:37 CET 2007


Hi,

when I compile a qt plugin in release mode (and therefore link against
release qt lib) I've the problem that cmake does not set -DQT_NO_DEBUG .
Because of this Qt assumes we're compiling this plugin in debug mode:

qconfig.h:
==========
#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
#  define QT_DEBUG
#endif

which leads to the wrong Q_PLUGIN_VERIFICATION_DATA:

qplugin.h:
==========
#  ifdef QT_NO_DEBUG
#    define QPLUGIN_DEBUG_STR "false"
#  else
#    define QPLUGIN_DEBUG_STR "true"
#  endif
#  define Q_PLUGIN_VERIFICATION_DATA \
    static const char *qt_plugin_verification_data = \
      "pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \
      "version="QT_VERSION_STR"\n" \
      "debug="QPLUGIN_DEBUG_STR"\n" \
      "buildkey="QT_BUILD_KEY"\0";


--> an app does not load this plugin because the verification data does
not match.

I'm posting this to cmake and kde-buildsystem list because I don't know
who to blame here - qt because it's not recognizing the NDEBUG flag
(which seems to be a widely used flag) or cmake because it's not adding
QT_NO_DEBUG to the compiler flags.



Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20071107/74df9592/attachment.pgp 


More information about the Kde-buildsystem mailing list