0
我刚刚与minGW一起下载了CLion,并创建了一个项目。在设置了很多哈斯之后,我设法获得了运行示例Hello World程序的按钮。但是,当我尝试运行该程序时,它说它在将此错误日志提供给我之前编译为50%:https://justpaste.it/wm14运行CLion C++示例程序时出错
它非常长,约450行。我不知道为什么我得到这个错误...任何帮助将不胜感激! :)
错误的前几行如下所示。有在随后的错误,如has not been declared using
或is not a member of 'std'
或does not name a type
列表开头In file included from
错误的列表类似于此的重复图案:
In file included from c:\mingw\include\wchar.h:208:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iosfwd:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Ole\Documents\programming\c++\testing\main.cpp:1:
c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
struct _stat __struct_stat_defined(_off_t, time_t);
^
c:\mingw\include\sys/stat.h:173:14: error: '_ino_t' does not name a type
struct _stat __struct_stat_defined(_off_t, time_t);
^
c:\mingw\include\sys/stat.h:173:14: error: '_mode_t' does not name a type
struct _stat __struct_stat_defined(_off_t, time_t);
^
这里是代码:
#include "iostream"
int main() {
std::cout << "Hello World!" << std::endl;
return 0;
}
我设法将问题与包含声明隔离开来。如果我删除包含(和cout),它会生成很好,但如果我添加include(而不是cout),它会给我同样的错误。
更新
我设法通过简单地删除minGW
和安装cygwin
来解决这个问题。
请将您的代码添加到您的问题。 –
我现在已经添加了代码。 – InzaneNova
我甚至设法缩小了这个问题的范围:D – InzaneNova