Windows 下 MinGW-W64 与 CMake 的安装
CMake
An open-source, cross-platform family of tools designed to build, test and package software.
CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.
CMake is part of Kitware’s collection of commercially supported open-source platforms for software development.
一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。
CMake 允许开发者编写一种平台无关的 CMakeLists.txt 文件来定制整个编译流程,然后再根据目标用户的平台进一步生成所需的本地化 Makefile 和工程文件,如 Unix 的 Makefile 或 Windows 的 Visual Studio 工程。从而做到 “Write once, run everywhere” 。
环境
- 操作系统:Windows 10
- 系统架构:x64-based PC
x64 是 x86 架构的 64 位拓展——x86-64: 64-bit extended。
打开 PowerShell,使用命令:
systeminfo
可以查看操作系统与系统架构等信息。
安装 MinGW-W64
如果你已经安装 MinGW-W64,可以跳过下面的步骤。
MinGW:Minimalist GNU on Windows
MinGW-w64 与 MinGW 的区别: MinGW 只能编译生成 32 位可执行程序,而 MinGW-W64 则可以编译生成 64 位或 32 位可执行程序。
-
下载:
💡 NOTE: 更新到 v9.0.0 后此通过此地址下载的是
mingw-w64-v9.0.0.zip
,需要自行进行构建,现成的可以在 winlibs 找到,往下翻到Download-Rel