<stdlib.h> not found in MinGW when MinGw include directory is added to search path
问题 I'm getting the error c:\mingw\lib\gcc\mingw32\6.3.0\include\c++\cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> when adding C:\MinGW\include to the compiler include search path: echo "#include <cstdlib>" | g++ -x c++ - -isystem C:/MinGW/include -o /dev/nul But CMake does this because some libraries (libcurl e.g.) are installed into C:\MinGW hence the curl include dir is C:\MinGW\include Am I doing something wrong or is this a bug in MinGW? I'm using