module - node.js c++ addon gyp build fails to start on windows 7 -
i tried build native addon node runs on windows , linux. addon needs access libnfc. compiled libnfc (and dependencys) on windows , linux. on windows copyed following files node-project:
"libnfc.dll", "libnfc.lib", "libusb.lib", "libusb0.dll" (libusb used libnfc)
my bindings.gyp looks follows:
{ "variables": { "build_files": ["libnfc.dll"] }, "targets": [ { "target_name": "addon", "sources": [ "addon.cc" ], "include_dirs": [ "<!(node -e \"require('nan')\")", "./nfc_include" ], 'conditions': [ ['os=="linux"', { 'libraries': [ '-lnfc' ] }], ['os=="win"', { 'libraries': [ '-llibnfc' ] }] ] } ] }
i still have trouble link against library, because search path seems (after try , error) "project-directory/build". rebuild delete files in folder, have recopy .lib files , use "node-gyp build" (not "rebuild") again. "build_files"-flag should copy set files build directory not work.
with trick "node-gyp" successfull builds addon. trying run following error:
d:\projekte\irobot\hg_mrobot\nodejs\nfcemulatemodule\node_modules\bindings\bindings.js:83 throw e ^ error: no error d:\projekte\irobot\hg_mrobot\nodejs\nfcemulatemodule\build\release\addon.node @ error (native) @ module.load (module.js:355:32) @ function.module._load (module.js:310:12) @ module.require (module.js:365:17) @ require (module.js:384:17) @ bindings (d:\projekte\irobot\hg_mrobot\nodejs\nfcemulatemodule\node_modul es\bindings\bindings.js:76:44) @ object.<anonymous> (d:\projekte\irobot\hg_mrobot\nodejs\nfcemulatemodule\ addon.js:1:94) @ module._compile (module.js:460:26) @ object.module._extensions..js (module.js:478:10) @ module.load (module.js:355:32) d:\projekte\irobot\hg_mrobot\nodejs\nfcemulatemodule>
actually have no idea whats problem. tryed copy ".lib" , ".dll" files folder of project -> no change. on linux works fine! think i'm still doing wrong linking library or module not find required dll's.
can help?
Comments
Post a Comment