sách gpt4 ai đã đi

node.js - node-gyp build - Cách chỉ định phiên bản Node mục tiêu khi xây dựng tiện ích mở rộng Node

In lại 作者:搜寻专家 更新时间:2023-10-31 22:18:53 36 4
mua khóa gpt4 Nike

我正在为 Node native 插件从 node-waf 构建迁移到 node-gyp 构建系统。 node-gyp 说它支持多个目标版本,但我在使用 node-gyp 时找不到如何指定目标 Node 版本。

问题是,我的系统安装了 node v0.10.3,但我需要为 node 版本 0.8.20 构建我的 native 插件。当我构建附加组件时,它使用 v0.10.3 的 header ,这当然会出错。

我找不到如何在使用 node-gyp 配置/构建时指定 Node 版本。

请帮忙。

1 Câu trả lời

解决方案是在使用 node-gyp 配置时指定 --target 参数。例如。

node-gyp --arch= --target=v0.8.20 configure

关于node.js - node-gyp build 如何在构建 Node 扩展时指定目标 Node 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15964427/

36 4 0
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com