Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Building Qt 5.15.2, -c++std c++14 actives C++17 support

    General and Desktop
    2
    6
    944
    Loading More Posts
    • 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.
    • M
      mblanchard last edited by mblanchard

      Hello,
      I'm trying to build Qt 5.15.2 on CentOS 7 + GCC 8.3.1 without C++17 but C++14 support. Running something like:

      ./configure -opensource -confirm-license -release -shared -R \$ORIGIN -c++std c++14 ...
      

      Ends-up generating build configuration like:

      Configure summary:
      
      Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
      Compiler: gcc 8.3.1
      Configuration: sse2 aesni compile_examples enable_new_dtags largefile precompile_header rdrnd shani sse3 ssse3 sse4_1 sse4_2 x86SimdAlways shared shared rpath release c++11 c++14 c++17 concurrent dbus reduce_exports reduce_relocations stl
      Build options:
        Mode ................................... release
        Optimize release build for size ........ no
        Building shared libraries .............. yes
        Using C standard ....................... C11
        Using C++ standard ..................... C++17
      ...
      

      Indeed, GCC 8 supports C++17 but I need a C++14 build and it seems like the -c++std c++14 flag does not restrict le standard level here...
      Any idea how I can get Qt's build system to enforce a C++ standard level ?
      Thanks!

      1 Reply Last reply Reply Quote 0
      • Christian Ehrlicher
        Christian Ehrlicher Lifetime Qt Champion last edited by

        @mblanchard said in Building Qt 5.15.2, -c++std c++14 actives C++17 support:

        but I need a C++14 build

        What do you think is different when you build Qt without c++17? The API is the same...

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 0
        • M
          mblanchard last edited by

          Agreed, but my problem is that the C++17 binaires seems to have a versioned sized delacollators (_ZdlPvm@@Qt5) that the C++14 has not.

          1 Reply Last reply Reply Quote 0
          • Christian Ehrlicher
            Christian Ehrlicher Lifetime Qt Champion last edited by

            But how should this be a problem? Do you want to move the compiled binaries to another system? When using the same gcc and linker and compile a program with c++14 on the same system I don't see why it should not work.

            Qt has to stay free or it will die.

            1 Reply Last reply Reply Quote 0
            • Christian Ehrlicher
              Christian Ehrlicher Lifetime Qt Champion last edited by

              If you really want to disable it you can at least modify configure.json and remove c++17 from the section "cxx17" / "qmake"

              Qt has to stay free or it will die.

              1 Reply Last reply Reply Quote 0
              • M
                mblanchard last edited by

                Ok thanks I'll try that!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post