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. Does Qt 5.15.1 MingW8.1.0 support c++17?

Does Qt 5.15.1 MingW8.1.0 support c++17?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 455 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.
  • Bruce.ZhangB Offline
    Bruce.ZhangB Offline
    Bruce.Zhang
    wrote on last edited by
    #1
    $ mingw32-make.exe
    Scanning dependencies of target gpds-static
    [  0%] Building CXX object _deps/gpds-build/lib/CMakeFiles/gpds-static.dir/src/archiver_xml.cpp.obj
    In file included from C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/filesystem:37,
                     from C:/Projects/Vision/QSchematic/build/_deps/gpds-src/lib/include/gpds/archiver.hpp:3,
                     from C:/Projects/Vision/QSchematic/build/_deps/gpds-src/lib/include/gpds/archiver_xml.hpp:4,
                     from C:\Projects\Vision\QSchematic\build\_deps\gpds-src\lib\src\archiver_xml.cpp:2:
    C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)':
    C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
        || (__p.has_root_name() && __p.root_name() != root_name()))
                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    
    jsulmJ 1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      GCC 8.1.0 should with some gaps. C++17 support was experimental until GCC 9.1.

      The namespace std::filesystem::__cxx11::path and the error looks suspiciously like the source is not being processed as C++17.
      What is in your PRO file/CMakeLists.txt to enable C++17?

      Bruce.ZhangB 1 Reply Last reply
      1
      • C ChrisW67

        GCC 8.1.0 should with some gaps. C++17 support was experimental until GCC 9.1.

        The namespace std::filesystem::__cxx11::path and the error looks suspiciously like the source is not being processed as C++17.
        What is in your PRO file/CMakeLists.txt to enable C++17?

        Bruce.ZhangB Offline
        Bruce.ZhangB Offline
        Bruce.Zhang
        wrote on last edited by Bruce.Zhang
        #3

        @ChrisW67
        I set the C++17 flag as bellow:

        set(CMAKE_CXX_STANDARD 17)

        If I compile with vs2017 works fine.

        1 Reply Last reply
        0
        • Bruce.ZhangB Bruce.Zhang
          $ mingw32-make.exe
          Scanning dependencies of target gpds-static
          [  0%] Building CXX object _deps/gpds-build/lib/CMakeFiles/gpds-static.dir/src/archiver_xml.cpp.obj
          In file included from C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/filesystem:37,
                           from C:/Projects/Vision/QSchematic/build/_deps/gpds-src/lib/include/gpds/archiver.hpp:3,
                           from C:/Projects/Vision/QSchematic/build/_deps/gpds-src/lib/include/gpds/archiver_xml.hpp:4,
                           from C:\Projects\Vision\QSchematic\build\_deps\gpds-src\lib\src\archiver_xml.cpp:2:
          C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)':
          C:/Qt/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
              || (__p.has_root_name() && __p.root_name() != root_name()))
                                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
          
          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Bruce-Zhang Did you enable C++17 in your pro file?

          CONFIG += c++17
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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