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. Building Qt 5.15.2, -c++std c++14 actives C++17 support
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 2.4k 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.
  • M Offline
    M Offline
    mblanchard
    wrote on last edited by mblanchard
    #1

    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
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mblanchard
        wrote on last edited by
        #3

        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
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

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

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mblanchard
              wrote on last edited by
              #6

              Ok thanks I'll try that!

              1 Reply Last reply
              0

              • Login

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