Linux QT download / usr / include / C + + / 7/ cstdlib:75 : 15: fatal error: stdlib. H: no such file or directory error

The phenomenon of
I recently wrote a small program under Ubuntu that always reports the following errors when running:

/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>

The reason:
I found out that:

This is because GCC7 has included libstdlib.h for better optimization, and the C Library header stdlib.h USES Include_next, which is sensitive to the GCC system header path.

Method 1: remove the following line from file in Qt:

INCLUDEPATH +=/usr/include

Method 2:
add the following line to the Qt. Pro file:



Read More: