最近我安装了Clion,但是甚至不能编译“Hello World”应用程序。 我单独安装MinGW compiller,但是当我尝试编译“Hello world”应用程序时,我有下一个错误:
In file included from c:mingwincludewchar.h:45:0,from c:mingwlibgccmingw324.8.1includec++cwchar:44,from c:mingwlibgccmingw324.8.1includec++bitspostypes.h:40,from c:mingwlibgccmingw324.8.1includec++iosfwd:40,from c:mingwlibgccmingw324.8.1includec++ios:38,from c:mingwlibgccmingw324.8.1includec++ostream:38,from c:mingwlibgccmingw324.8.1includec++iostream:39,from C:UsersAlexandrClionProjectsuntitled2main.cpp:1: c:mingwincludewctype.h:67:1: error: '_CRTIMP' does not name a type _CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t); ^ ........... ^ c:mingwincludewctype.h:76:1: error: '_CRTIMP' does not name a type _CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t); ^ c:mingwincludewctype.h:77:1: error: '_CRTIMP' does not name a type _CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t); ^ c:mingwincludewctype.h:80:1: error: '_CRTIMP' does not name a type _CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t); ^ c:mingwincludewctype.h:84:29: error: expected initializer before 'iswblank' int __cdecl __MINGW_NOTHROW iswblank (wint_t); ^ c:mingwincludewctype.h:90:1: error: '_CRTIMP' does not name a type _CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t); ^ c:mingwincludewctype.h:91:1: error: '_CRTIMP' does not name a type _CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t); ^ c:mingwincludewctype.h:93:1: error: '_CRTIMP' does not name a type _CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int); ^ c:mingwincludewctype.h:157:33: error: expected initializer before 'towctrans' wint_t __cdecl __MINGW_NOTHROW towctrans(wint_t,wctrans_t); ^ c:mingwincludewctype.h:158:35: error: expected initializer before 'wctrans' wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*); ^ c:mingwincludewctype.h:159:34: error: expected initializer before 'wctype' wctype_t __cdecl __MINGW_NOTHROW wctype(const char*);
我该如何解决?
在Windows上使用OpenCV与Clion IDE
使用MinGW在Windows上编译OpenCV
MinGW sh.exe不能在你的path
CLion不承认Cygwin编译器
不能运行任何程序
我刚刚安装了一个MingW的新副本,并选择了很多软件包进行安装,然后安装CLion 1.1.1并将路径设置为c: MingW bin到您的环境变量PATH
明文的链接: http : //sourceforge.net/projects/mingw/files/
我创建了一个hello项目并对其进行编译,所有的东西都能正常工作
这里是hello world的执行结果,没有编译器问题
如果出现路径问题,就像我一样,您必须卸载并安装CLion来识别您的路径
在Windows 7下测试
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。