CMake 不生成 MinGW makefile,而是生成 MSVS 2013
CMake does not generates MinGW makefile, but MSVS 2013
我正在尝试从这里使用 MinGW 安装构建简单的控制台应用程序:http://nuwen.net/mingw.html。这个软件包已经包含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;
}
之后,我执行以下操作:
> 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项目/解决方案(我也有versio 2013安装)用于此应用程序构建。但我想使用 MinGW 安装构建它。
如何实现?
UPD: cmake -G "MinGW Makefiles" .. - 这是正确的命令行。我在执行它时发现了一个注释 - 我的 PATH 中有sh.exe
- 一个在MSYS
中,一个在Git
目录中。它会影响 MinGW 构建,所以我重命名了它,所以两者都sh1.exe
一切正常!
生成器选项为大写:-G
@Angew
相关文章:
- std::multimap<std::chrono::milliseconds, T>::rbegin 在 MSVS-13 中指向 end()?
- 如何递归地解决USACO 2013-周长-银
- 标准对此指向成员函数类型模板参数有何说明?是我的代码有误,还是 MSVS 16.6 有问题?
- 将"libpqxx"与Visual Studio 2013链接/安装,以便与PostgrSQL建立C++连接
- Visual Studio 2013,错误 MSB8020:找不到 Visual Studio 2010 的生成工具
- 为什么在Visual Studio 2013上的std::this_thread::sleep_for上死锁
- C++20 概念测试在 MSVS 16.5 中不起作用
- Visual Studio Professional 2013, Update 5, "No Target Architecture"
- Opencv在2013年第5季度不起作用.应用程序总是在窗口中崩溃
- 构建在VS 2013中找不到平台工具集= 'v141'
- 性能报告 (.vspx) 在 Visual Studio 2013 中未打开(显示损坏)
- 如何在"XAML for Windows Embedded (Compact 2013)"中切换图像
- 这是MSVC 2013中具有共享PTR的单例的正确实现吗?
- boost::stacktrace on Windows MSVS 2017
- 为什么这个自定义分配器的析构函数在 GCC/MSVS 的 stdlib 中被调用两次
- 在 Visual Studio 2013 中使用零大小数组C++
- MFC 对话框属性表用法在 VS 2017 中产生错误,适用于 VS 2013
- CMake 不生成 MinGW makefile,而是生成 MSVS 2013
- 提升 1.57.0 程序选项 MSVS 2013 链接器错误
- 一台计算机中出现 msvs 2013 错误 C2057,另一台计算机中没有错误。这是怎么回事?