首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CMake不生成MinGW makefile,但生成MinGW 2013

CMake不生成MinGW makefile,但生成MinGW 2013
EN

Stack Overflow用户
提问于 2015-04-24 13:28:32
回答 1查看 477关注 0票数 0

我正在尝试使用MinGW安装构建简单的控制台应用程序:http://nuwen.net/mingw.html。这套方案已经包含GCC 4.9.2和推高1.57。创建这样的简单文件:

代码语言:javascript
复制
#include <iostream>
#include <boost/accumulators/accumulators.hpp>

using namespace std;

int main()
{
    cout << "Hello World!" << endl;
    return 0;
}

在此之后,我做了以下工作:

代码语言:javascript
复制
> pwd
/d/..../Boost-Accumulators
> mkdir build
> cd build
> pwd
/d/..../Boost-Accumulators/build
> cmake -g "MinGW Makefiles" ..
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/alp/Projects/Boost-Accumulators/build

毕竟,我只有MSVS项目/解决方案(我也有版本2013年分期付款)用于这个应用程序的构建。但是我想使用MinGW安装来构建它。

如何实现这一目标?

UPD:cmake -G "MinGW Makefiles“-这是正确的命令行。我在执行它时发现了一个注意事项--我的路径中有sh.exe --一个在MSYS中,一个在Git目录中。它影响了MinGW的构建,所以我重新命名了它,使sh1.exe和所有的工作都很好!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-04-25 17:08:56

生成器选项大写:-G

@Angew

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29848780

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档