Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Setting QtCreator compiler build flags when using cmake, gcc on linux -std=c++14
Forum Updated to NodeBB v4.3 + New Features

Setting QtCreator compiler build flags when using cmake, gcc on linux -std=c++14

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Grant_Rostig
    wrote on 16 Mar 2016, 03:46 last edited by Grant_Rostig
    #1

    This question is asked many times on stackoverflow but there no good and specific answers that I can find there or here. Can't find any reference in the Qt manuals either. Where exactly should I look in the documentation it it exists?

    Presuming there is no documentation :(, here is what I've done:
    Built a 'non-Qt project/plain c++ application' project using CMake with a custom 'kit' using QtCreator.

    The custom kit consists of a 'Desktop Qt 5.5.1 GCC 64bit2' with a custom compiler.

    The custom compiler consists of a 'clone' of the auto-detected GCC X86 64bit and invokes /usr/bin/g++ using an x86-linux-generic-elf-64bit ABI. I get a compiler error when I build from the IDE saying that some of my code is not supported in c++98. I can build and run using old syntax, but when I use c++14 syntax, I get compiler errors due to the lack of the -std=c++14 flag on the gcc (5.3.1) invocation.

    In hopes of making it work I put "-std=c++14" in the 'Platform codegen flags' text box. It appears to have no effect.

    Thanks in advance for any help.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Mar 2016, 22:39 last edited by
      #2

      Hi and welcome to devnet,

      Just to be sure are you using CMake or qmake for handle your project ?

      If CMake then this page might be of use.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      16 Mar 2016, 03:46

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved