santigimeno / node-pcsclite

Bindings over pcsclite to access Smart Cards
ISC License
170 stars 127 forks source link

Error building on OS X #75

Closed chemdrew closed 7 years ago

chemdrew commented 7 years ago

Hi all,

I'm probably just being a noob here but getting a node-gyp error when trying to install.

versions:

node: 8.1.0
npm: 5.0.3
os x: 10.12.5

error:

In file included from ../src/addon.cpp:1:
In file included from ../src/pcsclite.h:6:
/usr/local/opt/pcsc-lite/include/PCSC/winscard.h:41:10: error: 'pcsclite.h' file not found with <angled> include; use "quotes" instead
#include <pcsclite.h>
         ^~~~~~~~~~~~
         "pcsclite.h"
In file included from ../src/addon.cpp:1:
In file included from ../src/pcsclite.h:6:
In file included from /usr/local/opt/pcsc-lite/include/PCSC/winscard.h:41:
/usr/local/opt/pcsc-lite/include/PCSC/pcsclite.h:45:10: error: 'wintypes.h' file not found with <angled> include; use "quotes" instead
#include <wintypes.h>
         ^~~~~~~~~~~~
         "wintypes.h"
2 errors generated.

This looks like it's an error not having libpcsclite-dev package. But I'm not seeing that package available for osx (brew or macports)

Can anyone confirm this is the issue I have? Where I can install the pcsc dev packages? Anything helps, thanks!

santigimeno commented 7 years ago

@chemdrew I'm confused with the winscard.h path. Did you install those pcsc files manually? You should be using the PCSC framework directly. For example on my os x: 10.12.5 box the winscard.h path is: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/winscard.h

chemdrew commented 7 years ago

@santigimeno just checked that same path and found the winscard header file in the exact same location as yours. I wasn't aware it came bundled with xcode and installed it manually (all that headache for nothing lol). I'll try uninstalling where I did that and see if it resolves

chemdrew commented 7 years ago

@santigimeno that did the trick! Thanks for the help, closing out now