V. *_*nko 4 c++ windows mingw mingw-w64 clion
最近,我安装了Clion,但是甚至无法编译“ Hello World”应用程序。我分别安装MinGW编译器,但是当我尝试编译“ Hello world”应用程序时,我遇到下一个错误:
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*);
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我刚刚正确安装了一份新的MingW副本,并选择了许多要安装的软件包,然后安装CLion 1.1.1并将路径c:\ MingW \ bin设置为环境变量PATH。
MingW的Inslall链接:http : //sourceforge.net/projects/mingw/files/
我创建了一个hello项目并对其进行了编译,所有工作均正常进行
这是执行hello world的结果,没有编译器问题
如果像我一样遇到路径问题,则必须卸载并安装CLion才能像我一样识别路径
在Windows 7下测试