2015-10-17 73 views
4

最近我安裝了Clion,但即使是「Hello World」應用程序也無法編譯。 我單獨安裝MinGW的compiller,但是當我嘗試編譯的「Hello world」應用程序我有下一個錯誤:無法爲Clion安裝MinGW

In file included from c:\mingw\include\wchar.h:45:0, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iosfwd:40, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:38, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38, 
       from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39, 
       from C:\Users\Alexandr\ClionProjects\untitled2\main.cpp:1: 
c:\mingw\include\wctype.h:67:1: error: '_CRTIMP' does not name a type 
_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t); 
^ 
........... 
^ 
c:\mingw\include\wctype.h:76:1: error: '_CRTIMP' does not name a type 
_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t); 
^ 
c:\mingw\include\wctype.h:77:1: error: '_CRTIMP' does not name a type 
_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t); 
^ 
c:\mingw\include\wctype.h:80:1: error: '_CRTIMP' does not name a type 
_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t); 
^ 
c:\mingw\include\wctype.h:84:29: error: expected initializer before 'iswblank' 
int __cdecl __MINGW_NOTHROW iswblank (wint_t); 
          ^
c:\mingw\include\wctype.h:90:1: error: '_CRTIMP' does not name a type 
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t); 
^ 
c:\mingw\include\wctype.h:91:1: error: '_CRTIMP' does not name a type 
_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t); 
^ 
c:\mingw\include\wctype.h:93:1: error: '_CRTIMP' does not name a type 
_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int); 
^ 
c:\mingw\include\wctype.h:157:33: error: expected initializer before 'towctrans' 
wint_t __cdecl __MINGW_NOTHROW towctrans(wint_t, wctrans_t); 
           ^
c:\mingw\include\wctype.h:158:35: error: expected initializer before 'wctrans' 
wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*); 
           ^
c:\mingw\include\wctype.h:159:34: error: expected initializer before 'wctype' 
wctype_t __cdecl __MINGW_NOTHROW wctype(const char*); 

我怎樣才能解決呢?

回答

4

我只是正確安裝MingW平臺的全新副本,並選擇了很多包安裝的,在這之後您安裝克利翁1.1.1和路徑到C組:\ MingW平臺\ bin添加到環境變量PATH

Inslall鏈接的MingW:http://sourceforge.net/projects/mingw/files/

我創建了一個Hello項目,並編譯它,所有的東西正常工作

這裏是世界你好的執行結果並沒有編譯器問題

如果有一個路徑問題,因爲我有,你必須去安裝和安裝克利翁認識到和我一樣的路徑

enter image description here

Windows 7的

+1

他們下測試一個從sourceforge下載所選MinGW軟件包的安裝程序。 – MaXiMkA

+0

問題標有mingw-w64,你確定這會創建一個64位的可執行文件嗎? – AndreKR

+1

對我來說'mingw32-base'和'mingw32-gcc-g ++'足以讓它工作 – Derp