Node----ffi 安装及使用


 

一、准备

1.nodeJs;

2.node-gyp

$npm install --global --production windows-build-tools

方式二

手动安装
1.python 2.x;
(32bit还是64bit视情况稳定,比如dll是32bit,node就要32bit!!!)
2.Microsoft Visual C++ Build Tools 2015

link 编译工具

$npm install ffi

这样就可以在install之后编译成功

三、ffi使用方式

参考node-ffi

问题解决参考

https://github.com/nodejs/node-gyp/issues/702
https://github.com/nodejs/node-gyp#installation