c++ - How do I access USB with Electron? -
my systemenvironment: windows 10 visual studio 2015 (including c++ compiler tools) , node.js installed
i tried include node library electon-quick-start-project , failed.
first of tried electron-usb include electron-usb. you can found problem here. unfortunately couldn't solve it.
therefore tried include usb. found how here did every step according description:
- npm install --save usb
- changing variables property in node_modules/usb/binding.gyp include module_name , module_path
- electron-gyp node-gyp rebuild --target=0.26.0 --arch=ia32 --dist-url=https://atom.io/download/atom-shell
when executed rebuild command, got build error: error c2011: 'timespec': 'struct' type redefinition (compiling source file ..\libusb\libusb\core.c). same error in different files.
i included have_struct_timespec in project-files. didn't work either afterwards.
now ask myself, easiest , best way access usb electron? library can recommend? know complete tutorial include library electron?
if have vs2015 installed on windows 10 pc shouldn't have compile source electron-usb. npm install require use it. after installing electron-usb need npm install electron-prebuilt@1.0.2 must version because electron-usb doesn't work node version greater 5.x.
Comments
Post a Comment