如何 运行 在 Windows 上生成文件?

How to run makefile on Windows?

我在 Whosebug 上看过 post,他们说使用名为 "Developer Command Prompt for VS2012" 的命令提示符和 运行 这个命令:

nmake -f Makefile.win

这是我得到的错误。

它说无法识别g++,但我安装了它。有谁知道哪里出了问题吗?

  1. 转到环境变量 window(使用Windows的研究栏)。
  2. 编辑 Path 变量,添加安装 g++ 的完整路径(不要在末尾包含 g++.exe)。

保存,运行cmd 并再次尝试使用您的 makefile。