no match for 'operator>' error with Qt 5.11.2 and mingw32-5.3.0



  • I try to build qt project sqt on Windows 7 x86 with Qt 5.11.2 and mingw32-5.3.0 and recieve one error and many note while building.
    Error:

    C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include\c++\thread:88: ошибка: no match for 'operator>' (operand types are 'std::thread::native_handle_type {aka ptw32_handle_t}' and 'std::thread::native_handle_type {aka ptw32_handle_t}')
           { return __x._M_thread > __y._M_thread; }
                                  ^
    

    Notes are:

    C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include\c++\bits\stl_pair.h:233: note:   template argument deduction/substitution failed:
    C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include\c++\bits\stl_pair.h:233: candidate: template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
         operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
         ^
    

    I'm succesfully buils this project on my laptop with Archlinux, so i'm think that problem in my build environment on windows.
    Any ideas how check it?


  • Lifetime Qt Champion

    Hi
    Could you try delete build folder and add
    CONFIG += c++1z
    to the .pro file and see if that helps ?


  • Qt Champions 2018

    Probably better to ask the question directly here: https://github.com/parihaaraka/sqt/issues



  • @mrjj
    Hello
    I'm trying this, remained the same mistakes.



  • @VRonin
    if nothing helps, I'll write there.
    Since the error is related to the source files of the environment, and not the project, I believe that the problem is either in my environment or in the project settings.


  • Qt Champions 2018

    @fortress you have MinGW 5.3.0, which is already a bit older. May it be you need a newer compiler?



  • @aha_1980 my Maintenance tool for qt show that there is Qt 5.11.2 pre-built components for mingw32-5.3.0 (32-bit) (installed). Therefore i install tools/mingw32-5.3.0 toolchain. It is possible to install mingw 7.3.0 (64-bit), but my system is 32-bit and no pre-built comoponents for this toolchain.


  • Qt Champions 2018

    Hi @fortress,

    If I remember correctly, there will be no pre-build 32 bit MinGW version starting from Qt 5.12.

    You can still compile Qt from source yourself, of course.

    Regards



  • Hi @aha_1980, now i have install Qt 5.11.2 for both mingw32-5.3.0 and msvc 2015:
    qtand toolchain mingw 5.3.0 alt text
    Also installed MSVC 2015 Community edition.
    Building project in QtCreator with toolchain MSVC 2015 is successfull. Also some libs (as suggested by the author) on which this project depends, are built with msvc compiler. So, its only way to build this project is use MSVC toolcain.

    But, i suppose if i have Qt pre-built for mingw and mingw same version, all must compile without errors. So, i suppose a problem may be either building environment or project settings (compiler/linker flags, etc).

    I think I can try to create a simple project that will use <thread> and check how it will be compiled.


  • Qt Champions 2018

    Hi @fortress,

    your conclusion is good, however neiter MSVC 2015 nor GCC 5.3 are full C++17 capable. So some C++17 features might work, others will not.

    I think I can try to create a simple project that will use <thread> and check how it will be compiled.

    Probably a good idea :)


  • Qt Champions 2018

    Hi @fortress,

    your conclusion is good, however neiter MSVC 2015 nor GCC 5.3 are full C++17 capable. So some C++17 features might work, others will not.

    I think I can try to create a simple project that will use <thread> and check how it will be compiled.

    Probably a good idea :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.