FILE HEADER VALUES 14C machine (x86) 5 number of sections 5B201C51 timedate stamp Wed Jun 13 03:17:37 2018 0 file pointer to symbol table 0 number of symbols E0 size of optional header 102 characteristics Executable 32 bit word machine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Dump of file node.exe
PE signature found
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES 8664 machine (x64) 8 number of sections 59B7E90B timedate stamp Tue Sep 12 22:02:51 2017 0 file pointer to symbol table 0 number of symbols F0 size of optional header 22 characteristics Executable Application can handle large (>2GB) addresses
使用默认源安装的 x86 版本的 ffi,在编译时可能会出现 Error: 'ForceSet': is not a member of 'v8::Object' .这个 issue 在 github 上出现很久了,现在还没有修复。替代解决方案为:在 package.json 中,将 ffi 的依赖改为:
var path = require('path'); var lib_path=path.join(__dirname,"path_to_lib"); process.env.PATH = `${process.env.PATH}${path.delimiter}${lib_path}`; var lib_name = process.platform == "win32" ? "sqlite" : "libsqlite"; var api = ffi.Library(lib_name,{...});