配置 Windows 下的 nodejs C++ 模块编译环境 安装 node-gyp

简介: 配置 Windows 下的 nodejs C++ 模块编译环境 根据 node-gyp 指示的 Windows 编译环境说明, 简单一句话就是 "Python + VC++ 编译环境". 所有需要的安装文件, 我都下载好放到百度云盘了: nodejs-gyp-windows Python 安装 python-2.

配置 Windows 下的 nodejs C++ 模块编译环境

根据 node-gyp 指示的 Windows 编译环境说明, 简单一句话就是 "Python + VC++ 编译环境".

所有需要的安装文件, 我都下载好放到百度云盘了: nodejs-gyp-windows

Python

  • 安装 python-2.7.7.msi

iso 虚拟磁盘

  • 安装 DTLite4491-0356.exe

Windows XP

文件在: node-gyp-windows/windowsXP

  • 用 DTLite 打开 VS2010Express1.iso , 然后安装 Visual Studio C++ 2010 就OK了, 其他不需要安装

Windows 7

文件在: node-gyp-windows/windows7

  • 用 DTLite 打开 VS2012_WDX_ENU.iso , 然后点击 "Install" 就OK了, 会安装整个 Visual Studio Express 2012

编译你的第一个 nodejs c++ 模块

假设你在使用 node v0.10.29

这里举例安装 microtime 模块:

$ npm install microtime --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist

测试安装编译结果:

$ node -e 'console.log("now is %d ms", require("microtime").now())'
目录
相关文章
|
6天前
|
Linux 虚拟化 Docker
Windows12安装Docker
Windows12安装Docker
31 2
|
23天前
|
安全 Windows
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
24 1
|
1天前
|
SQL 数据管理 关系型数据库
如何在 Windows 上安装 SQL Server,保姆级教程来了!
在Windows上安装SQL Server的详细步骤包括:从官方下载安装程序(如Developer版),选择自定义安装,指定安装位置(非C盘),接受许可条款,选中Microsoft更新,忽略警告,取消“适用于SQL Server的Azure”选项,仅勾选必要功能(不包括Analysis Services)并更改实例目录至非C盘,选择默认实例和Windows身份验证模式,添加当前用户,最后点击安装并等待完成。安装成功后关闭窗口。后续文章将介绍SSMS的安装。
4 0
|
2天前
|
5G Python
Windows11搭建Python环境(Anaconda安装与使用)
Windows11搭建Python环境(Anaconda安装与使用)
13 0
|
2天前
|
关系型数据库 MySQL Windows
windows安装MySQL5.7教程
windows安装MySQL5.7教程
8 0
|
2天前
|
人工智能 安全 机器人
AI电销机器人系统源码部署:freeswitch安装Windows
在Windows上安装FreeSWITCH:访问官网下载安装程序,运行并按提示安装;选择安装路径和组件;等待安装完成;配置FreeSWITCH,修改设置;启动服务;测试其功能;如遇问题,参考官方文档或进行调试故障排除。记得定期更新维护以保证稳定安全。
|
6天前
|
网络协议 安全 测试技术
Windows安装禅道系统结合Cpolar实现公网访问内网BUG管理服务
Windows安装禅道系统结合Cpolar实现公网访问内网BUG管理服务
|
13天前
|
域名解析 网络协议 JavaScript
【Node系列】node工具模块
Node.js有多个内置的工具模块,这些模块提供了用于执行各种任务的功能。
22 2
|
C++ Windows
windows 7 c++ builder 6 F1 帮助无法打开 解决办法
下载  Windows6.1-KB917607-x86.msu  补丁,百度也有
793 0
|
1月前
|
安全 数据安全/隐私保护 Windows
解锁安全之门,Windows Server 2019密码修改攻略大揭秘
解锁安全之门,Windows Server 2019密码修改攻略大揭秘