QtSql Postgress MinGW8 compilation error.
-
@jsulm x64. It comes from the first include of QtSql related class.
I have a single class that deals with database stuff, DBConnector. In the dump from the compiler you can see the include is at line 9:
C:\Qt\Tools\mingw810_64\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\thread:273: 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'}) In file included from C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/future:39, from C:\Qt\5.15.2\mingw81_64\include\QtCore/qthread.h:51, from C:\Qt\5.15.2\mingw81_64\include\QtCore/QtCore:245, from ..\BalancerStringEditor\dbconnector.h:9,
-
Google search for the error shows quite a few unresolved issues like mine scattered over the web (SO and other places) which doesn't make me feel optimistic.
In the meantime I redownloaded Postgres libraries (from version 11 there is no x86 version, only x64) but the problem, no surprise here, remains.
-
@jsulm I did, looks like it is not reported.
I wonder if I should report it, considering we are not getting any bug fixes for 5.15 anyway or just wait for 6.02, switch and see if it is still broken... Anyway, looks like I either have to find workaround (I don't think I have skills to do that considering that I don't know what to do) or convince parties involved that this tool of mine will not work on Windows. Crap...
-
What exactly are you trying to achieve? I don't see where the Qt postgresql plugin is involved here nor is dbconnector.h any official Qt source so how should we know what you're doing here?
I would say you include a header before#include <QtCore/QtCore>
(which itself is a bad idea - it includes all QtCore header files for no reason) which messes up the whole stuff. Move it up as first include (and please don't include QtCore/QtCore but only the needed headers). -
@Christian-Ehrlicher That is new.
I always use QtCore to avoid the plethora of single class includes. Same with QtWidgets or QtGui. Apparently that doesn't work properly when working with external includes. It also sheds a bit of light on my other problems in the past... I simply was not aware.Anyway, now all works properly.
I just assumed that it is Postgres messing up, as this is the only new thing in the workflow that worked for me till now.
Lesson learned, thank you @Christian-Ehrlicher
-
@artwaw said in QtSql Postgress MinGW8 compilation error.:
I always use QtCore to avoid the plethora of single class includes.
Looks like you have enough time...