Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qmake substituting c++14 with c++1
QtWS25 Last Chance

qmake substituting c++14 with c++1

Scheduled Pinned Locked Moved General and Desktop
qmakec++14
8 Posts 3 Posters 4.7k Views
  • 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.
  • B Offline
    B Offline
    B_old
    wrote on 17 Mar 2015, 18:16 last edited by
    #1

    I'm using Qt Creator 3.3.2 to build a c++ project. I'm using clang 3.5 and the std lib that comes with gcc 4.9. In the qmake project file I've added the line CONFIG += c++14. In the resulting makefile it says -std=c++11 however, and my program will not compile. If I manually edit the makefile to -std=c++14 everything works as expected.
    This is ok, but sometimes the makefile will be overwritten by changes to my project layout and I have to edit it again. Is there a way around this?

    A 1 Reply Last reply 18 Mar 2015, 03:08
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on 17 Mar 2015, 20:35 last edited by
      #2

      Should work with qmake from Qt 5.4.0 or higher...

      1 Reply Last reply
      0
      • B B_old
        17 Mar 2015, 18:16

        I'm using Qt Creator 3.3.2 to build a c++ project. I'm using clang 3.5 and the std lib that comes with gcc 4.9. In the qmake project file I've added the line CONFIG += c++14. In the resulting makefile it says -std=c++11 however, and my program will not compile. If I manually edit the makefile to -std=c++14 everything works as expected.
        This is ok, but sometimes the makefile will be overwritten by changes to my project layout and I have to edit it again. Is there a way around this?

        A Offline
        A Offline
        andreyc
        wrote on 18 Mar 2015, 03:08 last edited by
        #3

        @B_old Take a look on the directory Qt/5.4/clang/mkspecs/common. It contains qmake base configuration files for various compilers.
        You can set QMAKE_CXXFLAGS_CXX11 = -std=c++14 in clang.conf to make a qmake to generate a Makefile with c++14.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          B_old
          wrote on 19 Mar 2015, 21:40 last edited by
          #4

          Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?

          ? A 2 Replies Last reply 21 Mar 2015, 19:21
          0
          • B B_old
            19 Mar 2015, 21:40

            Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?

            ? Offline
            ? Offline
            A Former User
            wrote on 21 Mar 2015, 19:21 last edited by A Former User
            #5

            @B_old Could you solve the issue in the meantime?

            1 Reply Last reply
            0
            • B Offline
              B Offline
              B_old
              wrote on 21 Mar 2015, 23:04 last edited by
              #6

              Unfortunately not. I basically gave up when I found out that the clang config seems to be missing. In practice I don't have to touch the makefile very often.

              1 Reply Last reply
              0
              • B B_old
                19 Mar 2015, 21:40

                Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?

                A Offline
                A Offline
                andreyc
                wrote on 25 Mar 2015, 03:51 last edited by
                #7

                @B_old
                There is a clang conf file Qt/5.4/gcc_64/mkspecs/common/clang.conf that contains QMAKE_CXXFLAGS_CXX11 = -std=c++11 try to change it c++14

                1 Reply Last reply
                1
                • B Offline
                  B Offline
                  B_old
                  wrote on 25 Mar 2015, 17:06 last edited by
                  #8

                  Ah, now I found it. Your suggestions also solved the problem! Thanks for the help.

                  1 Reply Last reply
                  0

                  6/8

                  21 Mar 2015, 23:04

                  • Login

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