Try qmake -config debug
Try qmake -config debug
That didn't work either.
I added:
-config debug
As additional args for the debug build in creator and left the .pro as:
CONFIG = qt warn_on resources uic
Notice the -O2 flags in the output, so it is still building as release:
14:29:44: Running steps for project asg...
14:29:44: Starting: "C:\Qt\4.8.3\bin\qmake.exe" D:\personal\asg\asg.pro -r -spec win32-msvc2010 -config debug
14:29:44: The process "C:\Qt\4.8.3\bin\qmake.exe" exited normally.
14:29:44: Starting: "C:\Qt\qtcreator-2.5.2\bin\jom.exe"
c:\Qt\4.8.3\bin\uic.exe MainWindow.ui -o ui_MainWindow.h
c:\Qt\4.8.3\bin\uic.exe NewGameDialog.ui -o ui_NewGameDialog.h
cl -c -nologo -Zm200 -Zc:wchar_t- -EHsc -O2 -MD -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.8.3\include\QtCore" -I"c:\Qt\4.8.3\include\QtGui" -I"c:\Qt\4.8.3\include" -I"." -I"c:\Qt\4.8.3\include\ActiveQt" -I"." -I"c:\Qt\4.8.3\mkspecs\win32-msvc2010" -Fo @C:\Users\andyb\AppData\Local\Temp\GameView.obj.60 60.0.jom
I found the answer on Stackoverflow. Looks like the answer is to do this in the .pro file:
Qt Code:
CONFIG -= debug_and_release CONFIG( debug, debug|release ) { CONFIG -= release } else { CONFIG -= debug CONFIG += release }To copy to clipboard, switch view to plain text mode
This seems to work , but Yuk! Surely there must be a more elegant way?
A more elegant way to do what exactly?
Set CONFIG to 'debug' or 'release' from the Creator IDE, without having to modify the .pro file.
How did the pro file look like initially? I really have no problems in modifying CONFIG when invoking qmake![]()
The Release mode enables optimizations and generates without any debug data, so it is fully optimized. . Lots of your code could be completely removed or rewritten in Release mode. The resulting executable will most likely not match up with your written code. Because of this release mode will run faster than debug mode due to the optimizations. More about.....Debug and Release build
Walsh
Bookmarks