[Qt-creator] Release/debug mess with VS2003 build
Eike Ziller
eike.ziller at nokia.com
Wed Jul 15 17:41:45 CEST 2009
On Jul 15, 2009, at 4:11 PM, ext Scott Morgan wrote:
> Got the Qt source and built it with VS2003, pointed QtCreator at it
> and
> stuff builds but there seems to be a mess with release/debug
> matching in
> the qmake step.
>
> If the .pro file has the following:
>
> debug {
> LIBS += MyDebug.lib
> }
> release {
> LIBS += MyRelease.lib
> }
>
> Both libs get included in both debug and release versions of the
> makefile.
>
> Adding the following to the .pro file to list what config items are
> being set:
>
> message(--------------------------)
> for(val, CONFIG) {
> message($$val)
> }
>
> Shows that there is a mess of release and debug items set for both
> versions of the build. Currently it seems 'Release' and 'Debug' (note
> the caps) items work correctly, but where are the other, spurious,
> items
> coming from?
>
> Scott
Try to avoid the "debug" and "release" scopes, because qmake doesn't
guarantee that they are not defined *both* at the same time.
Instead the scopes "CONFIG(debug, debug|release)" and "CONFIG(release,
debug|release)" do what you actually want to do. The code above then
looks
CONFIG(debug, debug|release) {
LIBS += MyDebug.lib
}
CONFIG(release, debug|release) {
LIBS += MyRelease.lib
}
--
Eike Ziller
Software Engineer
Nokia, Qt Software
Phone +49 (0)30 6392 3255
Fax +49 (0)30 6392 3256
E-mail eike.ziller at nokia.com
More information about the Qt-creator-old
mailing list