문제점 : CONFIG (디버그 | 디버그) 및 CONFIG (릴리스, deubg | 릴리스)는 Qt Creator 2.8.1에서 선택된 디버그 또는 릴리스가있는 곳에서 항상 평가됩니다. 리눅스.Qt Creator Qt Creator CONFIG (디버그, 릴리스) 스위치가 작동하지 않습니다.
Qt는 창조주 응용 프로그램 (주 - 새 프로젝트에 대한 기본)의 내 구성 :
Projects->Build Settings->Debug Build Steps:
qmake build configuration: Debug
Effective qmake call: qmake2 proj.pro -r -spec linux-gnueabi-oe-g++ CONFIG+=debug
Projects->Build Settings->Release Build Steps:
qmake build configuration: Release
Effective qmake call: qmake2 proj.pro -r -spec linux-gnueabi-oe-g++
proj.pro에 내 구성 : 디버그를위한 콘솔
message(Variable CONFIG:)
message($$CONFIG)
CONFIG(debug,debug|release)
{
message(Debug build)
}
CONFIG(release,debug|release)
{
message(Release build)
}
출력 :
Project MESSAGE: Variable CONFIG:
Project MESSAGE: lex yacc warn_on debug uic resources warn_on release incremental link_prl no_mocdepend release stl qt_no_framework debug console
Project MESSAGE: Debug build
Project MESSAGE: Release build
출력 콘솔 용 출력 :
Project MESSAGE: Variable CONFIG:
Project MESSAGE: lex yacc warn_on uic resources warn_on release incremental link_prl no_mocdepend release stl qt_no_framework console
Project MESSAGE: Debug build
Project MESSAGE: Release build
Windows 7에서 그런 .pro 구성에 문제가 발생하지 않았으므로 제대로 작동했습니다. 나는 필사적이었고, .PRO 파일 수정 :
CONFIG = test
message(Variable CONFIG:)
message($$CONFIG)
CONFIG(debug,debug|release)
{
message(Debug build)
}
CONFIG(release,debug|release)
{
message(Release build)
}
을 나는 출력과 놀라게했다 그래서
Project MESSAGE: Variable CONFIG:
Project MESSAGE: test
Project MESSAGE: Debug build
Project MESSAGE: Release build
여전히 디버그를보고 구성을 해제 심지어 내가 completly 깨끗한 CONFIG 변수합니다.
무엇이 잘못 되었나요?
릴리스의 경우 'qmake CONFIG- = Debug'를 실행하고 디버그의 경우 'qmake CONFIG- = Release'를 실행하십시오. – dvvrd
첫 번째 코드 인용에서 알 수 있듯이 이렇게합니다. – killdaclick
아니요. 나는 CONFIG + = debug가 아닌 CONFIG = debug를 보았습니다. – dvvrd