/usr/include/c ++/7/cstdlib:75:15:致命错误:stdlib.h:没有这样的文件或目录#include_next< stdlib.h> [英] /usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>

查看:2715
本文介绍了/usr/include/c ++/7/cstdlib:75:15:致命错误:stdlib.h:没有这样的文件或目录#include_next< stdlib.h>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用opengl和CGAL进行了c ++ qt项目,但是出现了以下错误:

I've c++ qt project using opengl and CGAL but I've the following error:

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

我搜索了有关-DENABLE_PRECOMPILED_HEADERS = OFF的问题和大多数解决方案 我在.pro文件中使用它,但不能解决问题.

I searched about the problem and most of solutions about -DENABLE_PRECOMPILED_HEADERS=OFF I use it at .pro file and it doesn't solve the problem .

.pro文件:

QT       += core gui opengl
QT += xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = try_gui
TEMPLATE = app


    DEFINES += QT_DEPRECATED_WARNINGS

    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


     DENABLE_PRECOMPILED_HEADERS=OFF
    SOURCES += \
            main.cpp \
            mainwindow.cpp \
        my_polyhedron.cpp \
        myqglwidget.cpp

    HEADERS += \
            mainwindow.h \
        my_polyhedron.h \
        myqglwidget.h \
        My_Halfedge_base.h \
        My_Face_base.h

    FORMS += \
            mainwindow.ui

LIBS + = -L/lib64 -lgmp -lCGAL

LIBS += -L/lib64 -lgmp -lCGAL

    INCLUDEPATH +=/usr/include

当我从.pro文件中删除INCLUDEPATH + =/usr/include时,问题已解决
但出现有关达到CGAL的另一个错误:

the problem is solved when I remove INCLUDEPATH +=/usr/include from .pro file
but another errors are appears about reaching CGAL :

/usr/include/boost/graph/detail/adjacency_list.hpp:1755:5: note:   template argument deduction/substitution failed:
../try_gui/my_polyhedron.cpp:203:78: note:   ‘Surface {aka CGAL::Polyhedron_3<CGAL::Simple_cartesian<double> >}’ is not derived from ‘const boost::adj_list_helper<Config, Base>’
              .edge_index_map  (boost::get(CGAL::edge_external_index  ,surface))
                                                                              ^
../try_gui/my_polyhedron.cpp: In member function ‘void My_Polyhedron::drawTree(MyQGLWidget*, int)’:
../try_gui/my_polyhedron.cpp:329:27: error: ‘class CGAL::Kd_tree_node<CGAL::Search_traits_3<CGAL::Simple_cartesian<double> >, CGAL::Fair<CGAL::Search_traits_3<CGAL::Simple_cartesian<double> >, CGAL::Plane_separator<double> >, CGAL::Boolean_tag<true> >’ has no member named ‘size’
             if(leaves[i]->size() < 1) continue;
                           ^~~~
../try_gui/my_polyhedron.cpp:331:52: error: ‘class CGAL::Kd_tree_node<CGAL::Search_traits_3<CGAL::Simple_cartesian<double> >, CGAL::Fair<CGAL::Search_traits_3<CGAL::Simple_cartesian<double> >, CGAL::Plane_separator<double> >, CGAL::Boolean_tag<true> >’ has no member named ‘begin’
             Tree::Point_d_iterator it = leaves[i]->begin();

n file included from /usr/include/CGAL/subdivision_method_3.h:31:0,
                 from ../try_gui/my_polyhedron.cpp:6:
/usr/include/CGAL/Subdivision_method_3/subdivision_methods_3.h: In instantiation of ‘void CGAL::Subdivision_method_3::Sqrt3_subdivision(PolygonMesh&, int) [with PolygonMesh = My_Polyhedron]’:
../try_gui/my_polyhedron.cpp:175:60:   required from here
/usr/include/CGAL/Subdivision_method_3/subdivision_methods_3.h:236:16: error: no type named ‘type’ in ‘struct boost::property_map<My_Polyhedron, boost::vertex_point_t, void>’
   Sqrt3(pmesh, Sqrt3_mask_3<PolygonMesh>(&pmesh, get(vertex_point,pmesh)), step);

有什么帮助吗?

推荐答案

我通过添加解决问题 QMAKE_CFLAGS_ISYSTEM = -I

I solve the proble by adding QMAKE_CFLAGS_ISYSTEM = -I

到.pro文件

这篇关于/usr/include/c ++/7/cstdlib:75:15:致命错误:stdlib.h:没有这样的文件或目录#include_next&lt; stdlib.h&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆