简体   繁体   English

从哪里安装mingw-make? (CMAKE)

[英]Where to install mingw-make from? (CMAKE)

I've been trying to compile my code with CMake using the "MSYS Makefiles" generator.我一直在尝试使用“MSYS Makefiles”生成器用 CMake 编译我的代码。 I wrote the following command: cmake -S. -B build/ -G "MSYS Makefiles我写了以下命令: cmake -S. -B build/ -G "MSYS Makefiles cmake -S. -B build/ -G "MSYS Makefiles But I was presented with the following error: cmake -S. -B build/ -G "MSYS Makefiles但出现以下错误:


    CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_AR was not found, please set to archive program.

After some investigation, I found that I had to install something called "mingw-make" to do this.经过一番调查,我发现我必须安装一个名为“mingw-make”的东西才能做到这一点。 Apparently this "mingw-make" can be installed in the "MinGW gui".显然这个“mingw-make”可以安装在“MinGW gui”中。 Note that I checked if I already have "mingw-make" installed and I don't.请注意,我检查了我是否已经安装了“mingw-make”,但我没有。

I'm confused because I can't seem to find this "MinGW gui" anywhere.我很困惑,因为我似乎在任何地方都找不到这个“MinGW gui”。 I installed MinGW, and only have an application on my computer called "Modify or Remove MinGW".我安装了 MinGW,但我的电脑上只有一个名为“修改或删除 MinGW”的应用程序。 I searched the install options, and couldn't find "mingw-make" anywhere.我搜索了安装选项,但在任何地方都找不到“mingw-make”。 Where can I download this "mingw-make" from?我在哪里可以下载这个“mingw-make”? Thanks.谢谢。

Use mingw32-make only with cmake -G"MinGW Makefiles" . mingw32-make仅与cmake -G"MinGW Makefiles"一起使用。

Use make only with cmake -G"MSYS Makefiles" .仅将makecmake -G"MSYS Makefiles"一起使用。

But if you want the best performance you should get Ninja and use ninja with cmake -G"Ninja" .但是,如果您想要获得最佳性能,您应该获得Ninja并将ninjacmake -G"Ninja"一起使用。

MinGW is all command line, though there are some GUI installers for it. MinGW 都是命令行,尽管有一些 GUI 安装程序。 MinGW-w64 is the successor to MinGW which also supports 64-bit Windows. MinGW-w64 是 MinGW 的继任者,也支持 64 位 Windows。

There are standalone MinGW-w64 Windows releases available from https://winlibs.com/ that don't require installation steps, just extract.有独立的 MinGW-w64 Windows 版本可从https://winlibs.com/ 获得,不需要安装步骤,只需提取。 This also includes mingw32-make这也包括mingw32-make

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM