qxmpp-project / qxmpp

Cross-platform C++ XMPP client and server library
411 stars 197 forks source link

'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_constructible' #576

Closed Rhylx closed 1 year ago

Rhylx commented 1 year ago

Hi everyone, I'm trying to compile the master branch of this project on Windows 10 64 bits. Here is my setup:

Here are the compiling errors:

[{ "resource": "/C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.36.32532/include/type_traits", "owner": "cmake-build-diags", "code": "C2139", "severity": 8, "message": "'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait 'is_trivially_constructible' [D:\qxmpp-1.5.5\build\src\QXmppQt6.vcxproj]", "source": "MSVC", "startLineNumber": 584, "startColumn": 43, "endLineNumber": 584, "endColumn": 43 },{ "resource": "/C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.36.32532/include/type_traits", "owner": "cmake-build-diags", "code": "C2139", "severity": 8, "message": "'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_copyable' [D:\qxmpp-1.5.5\build\src\QXmppQt6.vcxproj]", "source": "MSVC", "startLineNumber": 584, "startColumn": 80, "endLineNumber": 584, "endColumn": 80 },{ "resource": "/C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.36.32532/include/type_traits", "owner": "cmake-build-diags", "code": "C2139", "severity": 8, "message": "'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait 'is_trivially_copyable' [D:\qxmpp-1.5.5\build\src\QXmppQt6.vcxproj]", "source": "MSVC", "startLineNumber": 599, "startColumn": 54, "endLineNumber": 599, "endColumn": 54 },{ "resource": "/C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.36.32532/include/type_traits", "owner": "cmake-build-diags", "code": "C2139", "severity": 8, "message": "'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_destructible' [D:\qxmpp-1.5.5\build\src\QXmppQt6.vcxproj]", "source": "MSVC", "startLineNumber": 820, "startColumn": 28, "endLineNumber": 820, "endColumn": 28 },{ "resource": "/C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.36.32532/include/type_traits", "owner": "cmake-build-diags", "code": "C2139", "severity": 8, "message": "'QXmppPubSubBaseItem': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_nothrow_destructible' [D:\qxmpp-1.5.5\build\src\QXmppQt6.vcxproj]", "source": "MSVC", "startLineNumber": 890, "startColumn": 28, "endLineNumber": 890, "endColumn": 28 }]

I have tried that on linux with GCC and apparently GCC is more flexible concerning the usage of templates on an incomplete type. Thanks in advance for your help, Rhylx

Rhylx commented 1 year ago

I've tried to use the stable version and it worked. I guess master is still work in progress for windows.

melvo commented 12 months ago

@Rhylx Does the current master branch work?