在 Xcode 中实施节点插件
Implement Node Addon in Xcode
有没有办法在 Xcode 上 运行 node-gyp
?这样我就可以在同一个项目中添加 JavaScript、C++ 文件、第三方静态库和 binding.gyp 文件,并且 运行 它与 Node.js?
或者是编写单独的文件,将它们放在同一目录中,运行在终端上运行 js 文件是解决此问题的唯一方法?
是的,我们可以在 Xcode 上实施 node-gyp
。
而不是命令$ node-gyp configure build
(或使用$ node-gyp rebuild
),我们应该做的步骤是:
$ node-gyp configure -- -f xcode
$ node-gyp build
我们还可以调整 Xcode 本身的一些设置,而不是单独编辑 binding.gyp
。
有没有办法在 Xcode 上 运行 node-gyp
?这样我就可以在同一个项目中添加 JavaScript、C++ 文件、第三方静态库和 binding.gyp 文件,并且 运行 它与 Node.js?
或者是编写单独的文件,将它们放在同一目录中,运行在终端上运行 js 文件是解决此问题的唯一方法?
是的,我们可以在 Xcode 上实施 node-gyp
。
而不是命令$ node-gyp configure build
(或使用$ node-gyp rebuild
),我们应该做的步骤是:
$ node-gyp configure -- -f xcode
$ node-gyp build
我们还可以调整 Xcode 本身的一些设置,而不是单独编辑 binding.gyp
。