Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ CMake不生成MinGW makefile,但生成MSVS 2013_C++_Cmake_Mingw W64 - Fatal编程技术网

C++ CMake不生成MinGW makefile,但生成MSVS 2013

C++ CMake不生成MinGW makefile,但生成MSVS 2013,c++,cmake,mingw-w64,C++,Cmake,Mingw W64,我正在尝试从以下位置使用MinGW安装构建简单的控制台应用程序:。该软件包已经包含GCC 4.9.2和Boost 1.57。创建这样的简单文件: #include <iostream> #include <boost/accumulators/accumulators.hpp> using namespace std; int main() { cout << "Hello World!" << endl; return 0;

我正在尝试从以下位置使用MinGW安装构建简单的控制台应用程序:。该软件包已经包含GCC 4.9.2和Boost 1.57。创建这样的简单文件:

#include <iostream>
#include <boost/accumulators/accumulators.hpp>

using namespace std;

int main()
{
    cout << "Hello World!" << endl;
    return 0;
}
毕竟,对于这个应用程序构建,我只有MSVS项目/解决方案(我还安装了2013版)。但是我想使用MinGW安装来构建它

如何实现

UPD:cmake-G“MinGW生成文件”。-这是正确的命令行。 我在执行它时发现了一个注意事项-我的路径中有
sh.exe
-一个在
MSYS
目录中,一个在
Git
目录中。它影响了MinGW构建,所以我将其重命名为so
sh1.exe
这两个版本都很好


生成器选项为大写:-G


@Angew

生成器选项为大写:
-G
@Angew噢,谢谢!真可耻!你要么删除问题,要么回答你自己的问题。
> 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