EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't compile with FSX SDK

BradleyDeLar opened this issue · comments

I've tried over the course of the last 12 months to try and compile manually with the FSX SDK but I have never been able to make any progress. Whenever I run npm run rebuild I get the following output:

c:\node-simconnect\src\addon.h(59): error C2065: 'SIMCONNECT_EXCEPTION_ALREADY_CREA TED': undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simcon nect\build\node-simconnect.vcxproj]
c:\node-simconnect\src\addon.h(60): error C2065: 'SIMCONNECT_EXCEPTION_OBJECT_OUTSI DE_REALITY_BUBBLE': undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simconnect\build\node-simconnect.vcxproj]
c:\node-simconnect\src\addon.h(61): error C2065: 'SIMCONNECT_EXCEPTION_OBJECT_CONTA INER': undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simco nnect\build\node-simconnect.vcxproj]
c:\node-simconnect\src\addon.h(62): error C2065: 'SIMCONNECT_EXCEPTION_OBJECT_AI':
undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simconnect\b uild\node-simconnect.vcxproj]
c:\node-simconnect\src\addon.h(63): error C2065: 'SIMCONNECT_EXCEPTION_OBJECT_ATC':  undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simconnect\ build\node-simconnect.vcxproj]
c:\node-simconnect\src\addon.h(64): error C2065: 'SIMCONNECT_EXCEPTION_OBJECT_SCHED ULE': undeclared identifier (compiling source file ..\src\addon.cc) [C:\node-simcon nect\build\node-simconnect.vcxproj]

This appears to be because the addon.h file contains exception variables that are specific to P3D and are therefore not present in the FSX Simconnect SDK. Has anyone managed to get this successfully compiling with the FSX SDK?

I have managed to compile by commenting out the following in addon.h. I'm not certain if this is a solution as it may cause issues elsewhere.

{ SIMCONNECT_EXCEPTION_ALREADY_CREATED, "SIMCONNECT_EXCEPTION_ALREADY_CREATED" },
{ SIMCONNECT_EXCEPTION_OBJECT_OUTSIDE_REALITY_BUBBLE,"SIMCONNECT_EXCEPTION_OBJECT_OUTSIDE_REALITY_BUBBLE" },
{ SIMCONNECT_EXCEPTION_OBJECT_CONTAINER, "SIMCONNECT_EXCEPTION_OBJECT_CONTAINER" },
{ SIMCONNECT_EXCEPTION_OBJECT_AI, "SIMCONNECT_EXCEPTION_OBJECT_AI" },
{ SIMCONNECT_EXCEPTION_OBJECT_ATC, "SIMCONNECT_EXCEPTION_OBJECT_ATC" },
{ SIMCONNECT_EXCEPTION_OBJECT_SCHEDULE, "SIMCONNECT_EXCEPTION_OBJECT_SCHEDULE" }

I wasn't using the latest version of the FSX SDK, I needed SP1A and SP2. Doh