2016-02-15 27 views
-1

我用Winodws7 64位MinGW64 + MSYS如何獲得適當的C++編譯CMake的

現在我試圖建立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++編譯器?

+0

爲什麼你試圖自己構建它?安裝程序/預編譯的二進制文件會錯過什麼? – Youka

+0

只是學習,謝謝。 – user1345414

+0

你的錯誤很奇怪。沒有'iostream.h',因爲STL頭文件沒有擴展名。爲什麼你的C編譯器被找到但不是C++?它怎麼可能是像'cwchar'丟失那麼基本的東西?看來你搞砸了你的MinGW安裝。 – Youka

回答

1

你混合了兩個編譯器。我建議:刪除舊的並安裝msys2+mingw64

+0

我用另一種方式解決了這個問題。我用https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%中的'MSYS-20111123.zip' 20%2832-bit%29/ 和'x86_64-5.3.0-release-win32-seh-rt_v4-rev0.7z' from https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting% 20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/ 現在我有一個新問題,並會在另一個線程中詢問。不管怎麼說,還是要謝謝你。 – user1345414