Where in Qt Creator do I pass arguments to a compiler ?

Where in Qt Creator do I pass arguments to a compiler ?

Asked on December 27, 2018 in Qt.
Add Comment


  • 3 Answer(s)

    Qt Creator  pass an arguments to a compiler:

    The .pro accepted  for new projects and one of the CMake files.

    Applying .pro:

    QMAKE_CXXFLAGS += -O2
    
    

    Accepting CMake:

    set( CMAKE_CXX_FLAGS "-g -Wall")
    
    
    Answered on December 27, 2018.
    Add Comment

    compiler flags  and  .pro file:

    QMAKE_CXXFLAGS += -std=c++0x
    
    

    The debug vs release to use the preordained qmake options to detect QMake documentation of well-being  floor  and compiler-independency, as QMake  to the compiler-specific flags.

    Answered on December 27, 2018.
    Add Comment

    The initialize the source code is:

    /A/ in the  .pro file code:

    DEFINES += HOPLA
    

    /B/ In you .cpp or .h file code:

    #ifdef HOPLA
    // Do something
    #else
    // Do something different
    #endif
    
    Answered on December 27, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.