I’m using: SWI-Prolog version 9.2.4, Unreal Engine version 5.3, Visual Studio 2022 version 17.10.3
I want to add the prolog c++ SWI-cpp2.h header file to an Unreal Engine component
But when I try to do that I get compiling issues
My code looks like this:
#pragma warning(disable: 4800)
#include "Windows/MinWindows.h"
#include "Windows/AllowWindowsPlatformTypes.h"
THIRD_PARTY_INCLUDES_START
#include "SWI-cpp2.h"
THIRD_PARTY_INCLUDES_END
#include "Windows/HideWindowsPlatformTypes.h"
#include "SWIPrologComponent.generated.h"
I also tried, hoping to solve anything, this:
#pragma warning(disable: 4800)
#include "Windows/MinWindows.h"
#include "Windows/AllowWindowsPlatformTypes.h"
THIRD_PARTY_INCLUDES_START
#include "SWI-Stream.h"
#include "SWI-Prolog.h"
#include "SWI-cpp2.h"
THIRD_PARTY_INCLUDES_END
#include "Windows/HideWindowsPlatformTypes.h"
#include "SWIPrologComponent.generated.h"
my errors look like this:
\ThirdParty\SWIProlog\headers\SWI-Stream.h(70): error C2628: 'intptr_t' followed by 'int' is illegal. Did you forget a ';'?
...
\ThirdParty\SWIProlog\headers\SWI-cpp2.h(1042): error C2059: syntax error: '{'
...
\ThirdParty\SWIProlog\headers\SWI-cpp2.cpp(972): error C2660: 'PlStream::Sputw': function does not take 2 arguments
...
and many other similar errors that shouldn’t be there of course.
I understand this may not be the right place to discuss something like this, but if you can help me out understand the dynamics in order to compile these header files I might be able to research it on some unreal engine related discussion groups.