Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

how to build debug using commandline on macos



  • I want use command to build project on terminal.
    I using qmake.exe, and make. but the output always release.
    how to change to debug?

    declare qmakePath=Qt/5.5/clang_64/bin/qmake
    declare proFilePath=/Users/Work/Project/Project.pro
    
    declare ReleaseOutput=/Users/Work/Build_Release
    mkdir -p ${ReleaseOutput}
    cd ${ReleaseOutput}
    ${qmakePath} ${proFilePath}
    make
    
    declare DebugOutput=/Users/Work/Build_Debug
    mkdir -p ${DebugOutput}
    cd ${DebugOutput}
    qmake -config debug
    ${qmakePath} ${proFilePath}
    make
    


  • I got it!!!!!

    ${qmakePath} "CONFIG+=debug" ${proFilePath}
    

Log in to reply