Error compiling OpenCV, fatal error: stdlib.h: No such file or directory

来源:互联网 发布:淘宝网健身手球 编辑:程序博客网 时间:2024/06/07 14:00
在编译opencv3.1时候,出现下面错误:cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_NEW_PYTHON_SUPPORT=ON -DINSTALL_PYTHON_EXAMPLES=ON -DWITH_TBB=ON -DWITH_V4L=ON -DINSTALL_C_EXAMPLES=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DWITH_OPENGL=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENEXR=ON
In file included from /usr/local/include/c++/6.2.0/bits/stl_algo.h:59:0,                 from /usr/local/include/c++/6.2.0/algorithm:62,                 from /home/dmelo/proj2/opencv/modules/core/include/opencv2/core/base.hpp:55,                 from /home/dmelo/proj2/opencv/modules/core/include/opencv2/core.hpp:54,                 from /home/dmelo/proj2/opencv/modules/highgui/include/opencv2/highgui.hpp:46,                 from /home/dmelo/proj2/opencv/build/modules/highgui/precomp.hpp:45:/usr/local/include/c++/6.2.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>                         ^compilation terminated.
加入下面编译选项:
-DENABLE_PRECOMPILED_HEADERS=OFF编译正常。

原创粉丝点击