I just downloaded CLion, together with minGW, and created a project. After a lot of hazzle I managed to get the button for running the sample Hello World program. However, when I try to run the program it says that it compiles to 50% before giving me this error log: https://justpaste.it/wm14
It is extremely long, about 450 lines. And I have no idea why I get this error... Any help would be greatly appreciated! :)
The first few lines of the errors are as follows. There is a repeating pattern similar to this in the list of errors that begins In file included from
followed by a list of errors such as has not been declared using
or is not a member of 'std'
or does not name a type
:
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 );
^
Here is the code:
#include "iostream"
int main () {
std::cout << "Hello World!" << std::endl;
return 0;
}
I have managed to isolate the problem to the include statement. If I remove the include (and the cout), it builds fine, but if I add the include (and not the cout) it gives me the same error.
Update
I managed to solve this by simply deleting minGW
and installing cygwin
.