[Qt-creator] Makefile.Debug is used for Release build

David Ching dc at remove-this.dcsoft.com
Mon Oct 5 17:36:00 CEST 2009


Update:  If I delete mylib\Makefile* before doing #3 (Build | Rebuild 
Project "projects" ), then the correct Release version is built!  There are 
3 makefiles that are generated in the mylib\ folder:

  Makefile
  Makefile.Release
  Makefile.Debug

In the Makefile, it has:

  # Command: c:\qt\4.5.3-vc\bin\qmake.exe -spec 
c:\Qt\4.5.3-vc\mkspecs\win32-msvc2005 -win32 CONFIG+=release 
CONFIG-=debug -o Makefile mylib.pro

(I added the CONFIG-=debug in the Projects screen of QtCreator.  This 
business of both release and debug being defined is somehow screwing up Qt 
Creator, I think.)

Any tips on getting this to work without having to delete the Makefiles 
would be most appreciated.

Thanks,
David



"David Ching" <dc at remove-this.dcsoft.com> wrote in message 
news:habtp9$fsv$1 at eple.troll.no...
> Qt Creator 1.2.1 on Windows
> Building project using Qt 4.5.3
>
>
> 1.  I have loaded a projects.pro which contains a SUBDIRS project:
>
> ---
> TEMPLATE = subdirs
> CONFIG += ordered
> SUBDIRS += mylib/mylib.pro \
>                      myapp/myapp.pro
> ---
>
> 2.  I set it to build the Release configuration by using the menu:  Build 
> | Set Build Configuration | Release
>
> 3.  I start the build using the menu:  Build | Rebuild Project "projects". 
> First, mylib is built.  The Compile output window shows:
>
> cd mylib\ && "C:\Program Files\Microsoft Visual Studio 
> 8\VC\BIN\nmake.exe" -f Makefile
> "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f 
> Makefile.Debug
>
>
> This is incorrect; Makefile.Debug is used, and Makefile.Release should 
> have been used.
>
>
> 4.  Then myapp is built.  The Compile output window shows:
>
> cd myapp\ && "C:\Program Files\Microsoft Visual Studio 
> 8\VC\BIN\nmake.exe" -f Makefile.myapp
> "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f 
> Makefile.mypp.Release
>
>
> This time, the release makefile is correctly used.
>
>
> What causes the .Debug makefile to be used instead of the .Release one? 
> The wrong one is being used, but only for one of the projects.  If it were 
> a configuration issue, wouldn't the wrong one be used for both of the 
> projects?
>
>
> Thanks,
> David 




More information about the Qt-creator-old mailing list