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:
- OpenGL development environment configuration [vs2017] + common problems
- Summary of problems encountered in compiling opengl code
- Mac OS error in make pycaffe times failure error:’python.h’file not found resolved
- Installation of Ubuntu + VTK
- Problem solving – vs debugging window flash solution
- error: ‘NULL’ was not declared in this scope
- Some small problems in using vs2017
- Upgrading QT4 project to Qt5 project
- g++ c++ error: ‘malloc’ was not declared in this scope
- c++ error: ‘malloc’ was not declared in this scope
- Vs cannot open the source file unistd. H under Windows
- C + + uses system (“pause”) to pause black windows
- Error: expected class name before ‘{‘ token
- Clion MinGW super fast configuration OpenGL development environment
- VS2010 debugging window flash solution
- Compile QT source code error causes and Solutions
- QT creator error: C1083: unable to open include file: “qmediaplayer”
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- error: ‘atoi’ was not declared in this scope
- Error: no override found for ‘vtkPolyDataMapper’.