libpqxx: Compiling with mingw 8.1.0: error: no match for 'operator==' in robusttransaction.cxx:16

I get an error while compiling libpqxx. Environment:

  • cmake 3.20.1
  • mingw_8.1.0_i686-posix-dwarf
  • Postgres 13

Looks like my mingw does not support this operator. Can we do anything about it? This version of mingw was selected on purpose and it would impose a real problem if I need to switch it.

In file included from ...\libpqxx-7.4.1\src\robusttransaction.cxx:16:
mingw_8.1.0_i686-posix-dwarf/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/thread:273:26: error: 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;
            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Long-standing known bug in MinGW. 😦

This may help: http://hectorhon.blogspot.com/2018/05/building-libpqxx-on-msys2-mingw-64-bit.html