xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

On 64bits node v.0.12 i have this error: call of overloaded ‘New(long unsigned int&)’ is ambiguous #48

Closed mariuz closed 9 years ago

mariuz commented 9 years ago

In file included from ../node_modules/nan/nan.h:80:0, from ../src/././fb-bindings.h:11, from ../src/./fb-bindings-blob.h:11, from ../src/fb-bindings-blob.cc:9: ../node_modules/nan/nan_new.h: In instantiation of ‘typename NanIntern::Factory::return_t NanNew(A0) [with T = v8::Integer; A0 = long unsigned int; typename NanIntern::Factory::return_t = v8::Localv8::Integer]’: ../src/fb-bindings-blob.cc:264:5: required from here ../node_modules/nan/nan_new.h:209:41: error: call of overloaded ‘New(long unsigned int&)’ is ambiguous return NanIntern::Factory::New(arg0);

mariuz commented 9 years ago

one more at line 209 in src/fb-bindings-eventblock.cc

Seems that we need a conversion from intptr_t to Integer

argv[1] = NanNew(Vector[i]);

CXX(target) Release/obj.target/binding/src/fb-bindings-eventblock.o In file included from ../node_modules/nan/nan.h:74:0, from ../src/././fb-bindings.h:11, from ../src/./fb-bindings-fbeventemitter.h:10, from ../src/fb-bindings-eventblock.cc:9: ../node_modules/nan/nan_new.h: In instantiation of ‘typename NanIntern::Factory::return_t NanNew(A0) [with T = v8::Integer; A0 = long int; typename NanIntern::Factory::return_t = v8::Localv8::Integer]’: ../src/fb-bindings-eventblock.cc:209:42: required from here ../node_modules/nan/nan_new.h:209:41: error: call of overloaded ‘New(long int&)’ is ambiguous return NanIntern::Factory::New(arg0);

mariuz commented 9 years ago

Fixed this way , I will send a pull request argv[1] = NanNew(uint32_t(Vector[i]));

mariuz commented 9 years ago

All compiles and installs ok with sudo npm install -g xdenser/node-firebird-libfbclient

please bump the version in npmjs