c++ - Compilation error: "stddef.h: No such file or directory" -
whenever try compile code ends error:
in file included /usr/include/wchar.h:6:0, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/cwchar:44, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/bits/postypes.h:40, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/iosfwd:40, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/ios:38, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/ostream:38, /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/iostream:39, test.cpp:1: /usr/include/sys/reent.h:14:20: fatal error: stddef.h: no such file or directory #include <stddef.h> ^ compilation terminated.
the code trying compile is:
#include <iostream> using namespace std; int main() { cout << "hello world! :d"; return 0; }
the error because gcc-core package , gcc-g++ not of same version. either downgrade 1 of them solve problem or update both libraries. updating both libraries recommended way.
Comments
Post a Comment