解决node-ffi在Windows XP上使用出现“Error: The specified procedure could not be found”的错误
来源:互联网 发布:微信联系人数据库恢复 编辑:程序博客网 时间:2024/05/16 16:18
nodejs的ffi库是一个非常好用的调用dll的库,尤其是在使用nwjs进行桌面应用开发的时候。
安装、编译、使用ffi库的方法比较简单,网上也有很多教程,但是当我们在win7或者更高的Windows系统中编译好了ffi模块,开发好了应用后会发现在Windows XP上无法require我们的ffi,及时将编译好的ffi_bindings.node单独require也无法使用,require的时候会出现“Error: The specified procedure could not be found”的错误。
经过几天的研究,终于找到了解决方案。在能够正常编译和引用ffi的Windows系统上,进入ffi文件夹中的src文件夹,找到文件“win32-dlfcn.cc”,并将里面的地96行和第99行的两行代码(我是用的ffi版本为2.2.0,其他版本还没有确定是不是这两行),对应的代码应该是:
errorMode = GetErrorMode();SetErrorMode(errorMode | SEM_FAILCRITICALERRORS);
将这两行代码注释掉,然后在从命令行进入到ffi根目录,执行“node-gyp rebuild”命令(或者“nw-gyp rebuild”命令,如果想要在nwjs中使用),编译出来的ffi库就可以在Windows XP上正常使用了。
阅读全文
0 0
- 解决node-ffi在Windows XP上使用出现“Error: The specified procedure could not be found”的错误
- 详解PostgreSQL成功安装oracle_fdw方法,解决the specified procedure could not be found错误
- 解决IIS出现The specified module could not be found的方法
- IIS出现The specified module could not be found解决方法
- IIS出现The specified module could not be found解决方法
- IIS出现The specified module could not be found错误解决方法!
- IIS出现The specified module could not be found的解决方法
- IIS出现The specified module could not be found的解决方法
- The specified module could not be found
- The specified module could not be found
- error127:The specified procedure could not be found.无法找到入口 无法定位程序输入点xxx 于动态链接库ulib.dll上
- GetModuleFileName False failed with error 126 (The specified module could not be found)
- OpenCV3.1 + Python2.7 error "DLL load failed: The specified module could not be found"
- ISAPI程序出现“The specified module could not be found”问题解决方法
- IIS不能访问,出现The specified module could not be found问题 解决方法
- Web服务器The specified module could not be found错误解决方法
- IIS错误解决方法:The specified module could not be found、访问 IIS 元数据库失败
- A server with the specified hostname could not be found.
- javaScript行内样式的获取及注意事项
- JavaEE的Struts2框架
- 一到n的乘积
- Python:把help的结果输出至文件
- Cookie简介
- 解决node-ffi在Windows XP上使用出现“Error: The specified procedure could not be found”的错误
- docker 部分常用命令及其功能笔记汇总
- 在eclipse中怎么执行sql语句
- 原码 反码 补码 及 python的位运算
- python实现验证码
- Android_Java--二分法查找
- unity 《专题系列》资源打包 Asset Bundles 第五节 Asset Bundles 依赖打包和加载
- botan2 编译
- 二叉查找树的