I'm using Code::Blocks with the GNU GCC Compiler and when I try to include any library which has no '.h', like #include or somehow it gives an error on stdlib.h file...
It gives many errors some are:
c:\mingw\include\stdlib.h|90|error: '_BEGIN_C_DECLS' does not name a type
c:\mingw\include\stdlib.h|363|error: '__CRT_ALIAS' does not name a type
c:\mingw\include\stdlib.h|367|error: '__CRT_ALIAS' does not name a type
c:\mingw\include\stdlib.h|444|error: '_locale_t' has not been declared
c:\mingw\include\stdlib.h|447|error: '_locale_t' has not been declared
stdlib.h|90|error: '_BEGIN_C_DECLS' does not name a type
However, I haven't even included the stdlib.h and I'm getting completly crazy! I've never used C++, I'm new to C and ws only testing the hello world, I've tried to install and uninstall Code::Blocks with MinGW. Does any one knows how to fix this?
My code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!";
return 0;
}
My file is .cpp, I have created a project and code::blocks's compiler on settings says: Selected Compiler: GNU GCC Compiler
And I selected the flag "Have g++ follow the C++11 ISO C++ language Standard [-std=c++11]". I'm running on Windows 10.