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? -
Hi
Could you try delete build folder and add
CONFIG += c++1z
to the .pro file and see if that helps ? -
Probably better to ask the question directly here: https://github.com/parihaaraka/sqt/issues
-
@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.
-
Hi @aha_1980, now i have install Qt 5.11.2 for both mingw32-5.3.0 and msvc 2015:
and toolchain mingw 5.3.0
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.
-
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 :)
-
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 :)