我正在尝试使用MinGW安装构建简单的控制台应用程序:http://nuwen.net/mingw.html。这套方案已经包含GCC 4.9.2和推高1.57。创建这样的简单文件:
#include <iostream>
#include <boost/accumulators/accumulators.hpp>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}在此之后,我做了以下工作:
> 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和所有的工作都很好!
发布于 2015-04-25 17:08:56
生成器选项大写:-G
@Angew
https://stackoverflow.com/questions/29848780
复制相似问题