Hello everyone,
I am using SWI-Prolog with Unity3D with the SWIPLCS interface and have been able to successfully interact with the swipl engine from my C# scripts.
However, the interaction is working inside the Unity3D Editor as well as when I compile my project (i.e. my game) for Windows (using the Mono compiler) but not when I compile my project for WebGL (using the Il2CPP compiler). In the last case, I get the following errors :
Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:7917:9: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
__this->set__uintptr_0(L_0);
~~~~~~^ ~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:7932:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_1 = L_0.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:7944:25: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t* L_0 = __this->get_address_of__uintptr_0();
~~~~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8017:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_1 = L_0.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8019:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_3 = L_2.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8028:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_1 = L_0.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8049:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_1 = L_0.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8059:21: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
uint64_t L_1 = L_0.get__uintptr_0();
~~~^~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8071:9: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
(&V_0)->set__uintptr_0(L_0);
~~~~~~^ ~~~~~~~~~~~~~~
C:\Users\sylva\Seafile\phd_limos\work\unity\wumpus_world\Library\Il2cppBuildCache\WebGL\il2cppOutput\SwiPlCs.cpp:8413:9: error: member reference base type 'uintptr_t' (aka 'unsigned long') is not a structure or union
__this->set__uintptr_0(L_0);
~~~~~~^ ~~~~~~~~~~~~~~
10 errors generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
From what I have understood, the compiler has issues translating the C++ code from the SWIPLCS interface.
Any idea how to solve this? Thanks