node-pcsc
node-pcsc copied to clipboard
nw-gyp compillation
I have an error when trying to compile with nw-gyp rather then node-gyp
"CIL library ( CIL module *) : error LNK2005: "public: class v8::Local<class v8::Value> __thiscall ...
whats goin on? is it some headers included two times?
Hi, it seems that the problem is in your nw.lib (node webkit lib if I'm right?), I've never tried to use nw-gyp and I'm not planning to support it any time soon. Did you tried to compile node-pcsc using node-gyp ? I did all my tests on a Linux machine, compilation may fail on windows, we can manage to fix it together if you want.
my module should work on client side thats why i use node-webkit and nw-gyp rather then node-gyp (node-webkit and node use diffrend ABI). The problem was in header files. If put #include <node.h> directly in sources but not in headers it compiles well with node-gyp and nw-gyp. It looks like some linker settings can be changed to achive same result but i dont know much about cpp linkers and dont have such solution. May be Ludovic can advise something^^?
I also cant compile with nw-gyp
../src/common.h:13:48: warning: format specifies type 'unsigned long' but the argument has type 'LONG' (aka 'int') [-Wformat] pcsc_stringify_error(result), result); ^~~~~~ ../src/pcsclite.cpp:45:52: warning: comparison of integers of different signs: 'LONG' (aka 'int') and 'unsigned int' [-Wsign-compare] if ((result != SCARD_S_SUCCESS) && (result != SCARD_E_TIMEOUT)) { ~~~~~~ ^ ~~~~~~~~~~~~~~~ ../src/pcsclite.cpp:155:20: warning: comparison of integers of different signs: 'LONG' (aka 'int') and 'unsigned int' [-Wsign-compare] if (result == SCARD_E_NO_READERS_AVAILABLE) { ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings generated. CXX(target) Release/obj.target/pcsclite/src/cardreader.o In file included from ../src/cardreader.cpp:2: ../src/common.h:13:48: warning: format specifies type 'unsigned long' but the argument has type 'LONG' (aka 'int') [-Wformat] pcsc_stringify_error(result), result);
getting some warnings...
I would like to use the smartcard reader on windows and mac.. (error log above is from mac)
for the record on OSX I get the same errors with node-gyp
Ok compilation worked now.
I had to make a few changes to the .cpp files (I will send them to the creator of this project) I also had to install buffertools with npm in the pcsc folder
The program I am running now on OSX opens up and show's the name of my cardreader and than crashes...
So I guess something is wrong with the C++ code at runtime now.. How could i debug the .cpp code? (I'm not really used to program in this language)
commented some js code now, and It seems after creation var pcsc = pcsc(); the program crashed after a few seconds.
@mn1aC did you pushed any branch I could look at?
@mn1aC bump :)