cpp-errors (C2664) while installing jdbc (0.6.2 | 0.6.4) in a node environment (6.13.1)

I use Win10. JAVA_HOME points to sdk1.7.0_80 and used in the system variable ‘PATH’.
I just installed node (node-v12.13.1-x64.msi). I also installed Chocolatey (v.0.10.15) to get support for native modules.
Chocolatey installed phyton2 (v2.7.17) and visualstudio2017-workload-vctools (v1.3.2) for C++.
Then I installed jdbc (v0.6.2) as well as jdbc (v0.6.4) by

npm i –save [email protected]

At the beginning everything looks fine as shown

> node-gyp rebuild
C:UsershuhnalfoDocumentsAHA, EASYEasynode-servernode_modulesjava>if not defined npm_config_node_gyp (node "C:UsershuhnalfoAppDataRoamingnpmnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild )  else (node "C:UsershuhnalfoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.

But then …
In both versions of jdbc I got a lot of errors stemming from C++. The errors are independent of the jdbc version.


c:usershuhnalfodocumentsaha, easyeasynode-servernode_modulesnannan_implementation_12_inl.h(103): error C2664:
"v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8::FunctionCallback,v8::Local<v8::Value>,int,v8
::ConstructorBehavior,v8::SideEffectType)" : Konvertierung von Argument 1 von "v8::Isolate *" in "v8::Local<v8::Context
>" nicht möglich (Quelldatei wird kompiliert ..srcjava.cpp) [C:UsershuhnalfoDocumentsAHA, EASYEasynode-servern
  c:usershuhnalfodocumentsaha, easyeasynode-servernode_modulesnannan_implementation_12_inl.h(105): note: Quelltyp konnte von keinem Konstruktor angenommen werden, oder die Überladungsauflösung des Konstruktors ist mehrdeutig (Quelldatei wird kompiliert ..srcjava.cpp)c:usershuhnalfodocumentsaha, easyeasynode-servernode_modulesnannan
  _implementation_12_inl.h(103): error C2664: "v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>,v8  ::FunctionCallback,v8::Local<v8::Value>,int,v8::ConstructorBehavior,v8::SideEffectType)" : Konvertierung von Argument
   1 von "v8::Isolate *" in "v8::Local<v8::Context>" nicht möglich (Quelldatei wird kompiliert ..srcmethodCallBaton.cpp)

Conversion errors like above occur and the installtion of ‘jdbc’ fails!

Are templates not supported in the contained VS-C++-Lib or is “v8::any” an indication that I should use Java 1.8?

Thanks for your help,

Archive from: https://stackoverflow.com/questions/59035535/cpp-errors-c2664-while-installing-jdbc-0-6-2-0-6-4-in-a-node-environment

Leave a Reply

Your email address will not be published. Required fields are marked *