Beginner: Unrecognized command line option ‘-std=gnu++14’ ??



  • Hello,

    I am new to QT Creator and have spent many hours trying to figure out where the following error is coming from:

    :-1: error: error: unrecognized command line option ‘-std=gnu++14’

    I am trying to get an OpenFrameworks example to compile on Ubuntu 14.04 LTS
    Openframeworks is newly installed, and compiles correctly using a make file.

    However, in QT Creator, I get the above error message. I cannot find where to change it.
    I don't inderstand why QT-Creator is supplying ‘-std=gnu++14’ and would like to override that.
    My setup is like this:

    Qt Creator 3.6.0
    Based on Qt 5.5.1 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit)
    on Ubuntu 10.04 LTS

    In Options Build & Run, Compiler
    Name: GCC-4.8
    Compile path: /usr/bin/gcc-4.8
    codegen and linker flags both left blank
    ABI: x86-linux-generic-elf-64bit

    QT Version set to:
    QT 4.8.6 in PATH /usr/lib/x86_64-linux-gnu/qt4/bin/qmake
    QT 4.8.6 for Desktop

    Kit
    Name: OpenFrameworks
    Devicetype: Desktop
    Device: Local PC (Default for Desktop)
    sysroot: blank
    Compiler: GCC-4.8
    Debugger: System GDB
    Qt Version: as above
    CMake tool: System Cmake

    I would be grateful if someone could help me get things going, please.

    Thanks.
    :-)
    John Montgomery,


  • Moderators

    How do you build it QtCreator? Using qmake, cmake, ...?



  • @jmmp said:

    OpenFrameworks

    I don't no exactly about the error, but basically this line (‘-std=gnu++14’) trying to enable the C++14 features. Please check your configuration is supporting C++14 features.



  • Thanks for responding,

    @jsulm I use QtCreator 'Build All' ( building one of the simple examples in OpenFrameworks.)

    @Bagavathi I know my system does not handle C++14, so why does QtCreator make this wrong request?


  • Qt Champions 2016

    hi and welcome
    Do you have a .pro file?
    if yes, look for
    CONFIG +=C++14



  • @jmmp

    I know my system does not handle C++14, so why does QtCreator make this wrong request?

    So any one of your sub packages are expecting C++14 possibly OpenFramework. Please check the requirement of OpenFramework or simply update your compiler gcc 4.8 to gcc 4.9



  • @mrjj No I don't have a .pro file so I am opening using a .qbs file
    @Bagavathi I have done as you said, and that has worked. (i.e. Upgrading gcc/g++ )

    In the meantime I also discovered ( I am on Ubuntu ), that using command-line and 'make' works fine for all projects. So I am sorted.
    Thanks very much for your help.
    :-)
    John Montgomery, Glassel, Scotland.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.