如何获得适当的C ++来编译CMAKE

时间:2016-02-15 01:01:58

标签: c++ cmake mingw

我在Winodws7 64bit上使用MinGW64 + msys

现在我正在尝试构建CMAKE,但我不能。

当我很快输入./configure时发生错误。

---------------------------------------------
CMake 3.2.3, Copyright 2000-2015 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.

我也在下面的Bootstrap.cmk / cmake_bootstrap.log中找到错误消息。

[日志文件中的第一条消息]

In file included from c:/mingw64/x86_64-w64-mingw32/include/c++/iosfwd:40:0,^M
                 from c:/mingw64/x86_64-w64-mingw32/include/c++/ios:38,^M
                 from c:/mingw64/x86_64-w64-mingw32/include/c++/ostream:38,^M
                 from c:/mingw64/x86_64-w64-mingw32/include/c++/iostream:39,^M
                 from cmake_bootstrap_4468_test.cxx:3:^M
c:/mingw64/x86_64-w64-mingw32/include/c++/bits/postypes.h:40:35: fatal error: cw
char: No such file or directory^M
compilation terminated.^M

[日志文件中的第二条消息]

cmake_bootstrap_4468_test.cxx:5:23: fatal error: iostream.h: No such file or dir
ectory^M
compilation terminated.^M
Test failed to compile

他们说cwchariostream.h不存在,虽然我有它们并设置了环境变量的路径。

第一次按摩说我的C ++编译器不合适。我是按mingw-get.exe安装的。

有谁知道,我怎样才能获得合适的C ++编译器?

1 个答案:

答案 0 :(得分:1)

你混合了两个编译器。我建议:删除旧的并安装msys2+mingw64