EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple "no overloaded function" errors when trying to compile

uriba107 opened this issue · comments

commented

I'm trying to compile for 64bit with p3d v4.5 SDK. I get a lot of "not overloaded function" erros.

As I'm fairly new to Node, and practically clueless with this compilation process on windows, I was hoping you might have some insight.

I'm using master branch code and It have taken me a few hours just to get rid of all the windows compiler errors.

here are just a few examples.
addon.cc(328,50): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments
addon.cc(437,58): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments
node-simconnect\src\addon.cc(511,29): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available

Thanks,
Uri

Hi, @uriba107. Which version of node.js are you using? These errors are likely due to some breaking changes in later versions of the v8/Node API. Specifying an older target version should fix this. For example node-gyp rebuild --target=10.16.3. Alternatively you may checkout the upgrades-branch where I have updated the code to work with node.js 12.x. I'm hoping to have this new version out soon.

commented

Thanks for the response, it's 12.x.

I'll have a look at the branch as suggested. Thanks!

I'm seeing a number of issues also, even when trying the upgrades branch.

Amongst numerous deprecated warnings I've narrowed the errors down to the following:

SimConnect.lib(SimConnectClient.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match va lue '1900' in addon.obj [C:\Users\bradp\Desktop\node-simconnect\node_modules\node-simconnect\build\node-simconnect.vc xproj]
SimConnect.lib(commClient.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1 900' in addon.obj [C:\Users\bradp\Desktop\node-simconnect\node_modules\node-simconnect\build\node-simconnect.vcxproj]
SimConnect.lib(SimConnectClient.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) char const *
__cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z) referenced in function "public: virtual class s td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::_System_error_catego ry::message(int)const " (?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocato r@D@2@@2@H@Z) [C:\Users\bradp\Desktop\node-simconnect\node_modules\node-simconnect\build\node-simconnect.vcxproj]
SimConnect.lib(commClient.obj) : error LNK2019: unresolved external symbol __imp___vsnprintf referenced in function " long __cdecl StringCbPrintfA(char *,unsigned int,char const *,...)" (?StringCbPrintfA@@YAJPADIPBDZZ) [C:\Users\bradp\ Desktop\node-simconnect\node_modules\node-simconnect\build\node-simconnect.vcxproj]
C:\Users\bradp\Desktop\node-simconnect\node_modules\node-simconnect\build\Release\node-simconnect.node : fatal error
LNK1120: 2 unresolved externals [C:\Users\bradp\Desktop\node-simconnect\node_modules\node-simconnect\build\node-simco nnect.vcxproj]

Any help would be appreciated

commented

@EvenAR
Followed you instructions, compiled with 12.13.0 no problem
However I'm getting
node-simconnect: Node.js 64 bit is not supported. Please install Node.js 32 bit.

even though I took the files from p3d sdk and compiled with x64 node.js, I've went as far as trying
node-gyp rebuild --target=12.13.0 --arch=x64

any tips for success?

thank you very much for all the hard work.

node-simconnect> node-gyp rebuild --target=12.13.0 --arch=x64 gyp info it worked if it ends with ok gyp info using node-gyp@5.0.2 gyp info using node@12.13.0 | win32 | x64 gyp info find Python using Python version 2.7.17 found at "C:\Python27\python.exe" gyp info find VS using VS2019 (16.2.29215.179) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"

----- Update -----
I've managed to get it to run.
All I needed to do was to edit the index.js, as it would automatically reject platform win32 with arch x64. guess it's there for the default 32 bit compilation.

Submitted PR #7

commented

@EvenAR ,
can this issue be closed now?

Closing this as the original problem was solved.