Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Windows, Qt 5.14.1, mingw and c++17
Forum Updated to NodeBB v4.3 + New Features

Windows, Qt 5.14.1, mingw and c++17

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 3 Posters 1.6k 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.
  • canellasC Offline
    canellasC Offline
    canellas
    wrote on last edited by canellas
    #1

    Hi all!

    I installed Qt Creator 4.11.1, with Qt 5.14.1, and the mingw version available is 7.3.0, which, AFAIK, does not support C++17.

    I installed Mingw 9.2.0, and tried to create a new Kit in QtCreator using this version of the compiler, but failed in all attempts.

    Would anyone know a reference on how to create a new QtCreator Kit, using an compiler that does not come with Qt 5.14.1?

    Thanks a lot!

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, don't think you need to worry about MinGW 9.2.0 for C++17, 7.3 should work fine
      I've been using C++17 features like structured bindings since last year with Qt and MinGW 7.3.

      1 Reply Last reply
      3
      • canellasC Offline
        canellasC Offline
        canellas
        wrote on last edited by
        #3

        Thanks for your help!

        I get a timestamp.h:27:10: error: no member named 'timespec_get' in namespace 'std' and timestamp.h:27:33: error: use of undeclared identifier 'TIME_UTC' in this code: std::timespec_get(&m_value, TIME_UTC);.

        I set QMAKE_CXXFLAGS = -fno-keep-inline-dllexport -std=c++17 -Werror, and also CONFIG += c++17.

        May be I must configure something else?

        P 1 Reply Last reply
        0
        • canellasC canellas

          Thanks for your help!

          I get a timestamp.h:27:10: error: no member named 'timespec_get' in namespace 'std' and timestamp.h:27:33: error: use of undeclared identifier 'TIME_UTC' in this code: std::timespec_get(&m_value, TIME_UTC);.

          I set QMAKE_CXXFLAGS = -fno-keep-inline-dllexport -std=c++17 -Werror, and also CONFIG += c++17.

          May be I must configure something else?

          P Offline
          P Offline
          Patrick N
          wrote on last edited by
          #4

          @canellas

          I think you are out of luck, see https://www.gnu.org/software/gnulib/manual/gnulib.html#timespec_005fget

          --

          timespec_get

          This function is missing on all non-glibc platforms: glibc 2.15, Mac OS X 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, OSF/1 5.1, Solaris 11.3, Cygwin, mingw, MSVC 14, Interix 3.5, BeOS, Android 9.0.

          --

          1 Reply Last reply
          3
          • canellasC Offline
            canellasC Offline
            canellas
            wrote on last edited by aha_1980
            #5

            Ouch! Well, at least I know now that it was not my mistake, and I know now how to fix it: I'll use int clock_gettime(clockid_t clock_id, struct timespec *tp);, as suggested here, and described here

            Thanks a lot!

            1 Reply Last reply
            2

            • Login

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