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.
Solutions:
Method 1: remove the following line from the.pro file in Qt:
INCLUDEPATH +=/usr/include
Method 2:
add the following line to the Qt. Pro file:
QMAKE_CFLAGS_ISYSTEM = -I
Reference: https://stackoverflow.com/questions/52532936/usr-include-c-7-cstdlib7515-fatal-error-stdlib-h-no-such-file-or-directo
Read More:
- gcc /usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory
- A fatal error C1083 occurred when compiling C + + code under. Net: unable to open the include file: “xuhk”_ Jnihelloworld. H “: solution to no such file or directory error.
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- Cannot open include file: ‘io.h‘: No such file or directory
- [C]fatal error: mysql.h: No such file or directory
- Vs fatal error C1083: unable to open include file: “sys / socket. H”: no such file
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- fatal error: Python.h: No such file or directory
- Vs2019 OpenGL glut: error: unable to open include file: ‘GL / glut. H’: no such file or directory
- 【linux】error: stdio.h: No such file or directory
- fatal error: Python.h: No such file or directory
- The first time I write OpenGL program, what should I do when I encounter “can’t open include file:” GL / glaux. H “: no such file or directory”?
- [Caffe] fatal error: hdf5.h: No such file or directory error solution
- fatal error: Python.h: No such file or directory compilation terminated.
- fatal error: openssl/bio.h: No such file or directory settlement programme
- Compiling the pi_kernel source code appears: fatal error: openssl/opensslv.h: No such file or directory
- Win10 vs 2017 prompt cannot open include file: “windows. H”: no such file or director
- caffe deep learning [three] compilation error: fatal error: hdf5.h: No such file or directory compilation terminated.
- Fatal error in CentOS: Python. H: no that file or directory