首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >75:15:致命错误: stdlib.h:没有这样的文件或目录#include_next <stdlib.h>

75:15:致命错误: stdlib.h:没有这样的文件或目录#include_next <stdlib.h>
EN

Stack Overflow用户
提问于 2018-07-15 18:22:54
回答 1查看 11.3K关注 0票数 6

我是使用CGAL库的初学者,在压缩CGAL之后,我尝试在fedora上运行一个组合地图示例qt创建者:

代码语言:javascript
复制
#include <QCoreApplication>

#include <CGAL/Combinatorial_map.h>
#include <iostream>
#include <cstdlib>

typedef CGAL::Combinatorial_map<3> CMap_3;
typedef CMap_3::Dart_const_handle Dart_const_handle;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    CMap_3 cm;
    // Create two tetrahedra.
    Dart_const_handle dh1 = cm.make_combinatorial_tetrahedron();
    Dart_const_handle dh2 = cm.make_combinatorial_tetrahedron();
    // Display the combinatorial map characteristics.
    cm.display_characteristics(std::cout);
    std::cout<<", valid="<<cm.is_valid()<<std::endl;
    unsigned int res = 0;
    // Iterate over all the darts of the first tetrahedron.
    // Note that CMap_3::Dart_of_orbit_range<1,2> in 3D is equivalent to
    // CMap_3::Dart_of_cell_range<3>.
    for (CMap_3::Dart_of_orbit_range<1,2>::const_iterator
         it(cm.darts_of_orbit<1,2>(dh1).begin()),
         itend(cm.darts_of_orbit<1,2>(dh1).end()); it!=itend; ++it)
      ++res;
    std::cout<<"Number of darts of the first tetrahedron: "<<res<<std::endl;
    res = 0;
    // Iterate over all the darts of the facet containing dh2.
    for (CMap_3::Dart_of_orbit_range<1>::const_iterator
         it(cm.darts_of_orbit<1>(dh2).begin()),
         itend(cm.darts_of_orbit<1>(dh2).end()); it!=itend; ++it)
      ++res;
    std::cout<<"Number of darts of the facet containing dh2: "<<res<<std::endl;

    return a.exec();
}

.pro文件:

代码语言:javascript
复制
QT -= gui

CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS

SOURCES += \
        main.cpp

INCLUDEPATH += /usr/include
LIBS += -lgmp -lmpfr -lCGAL

但它显示了以下错误:

代码语言:javascript
复制
In file included from /usr/include/c++/7/bits/stl_algo.h:59:0,
                 from /usr/include/c++/7/algorithm:62,
                 from /usr/include/QtCore/qglobal.h:68,
                 from /usr/include/qt5/QtCore/qcoreapplication.h:43,
                 from /usr/include/qt5/QtCore/QCoreApplication:1,
                 from ../untitled/main.cpp:1:
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>

我仔细研究了这个问题,但没有任何事情与我一起工作--谢谢你的帮助。

EN

回答 1

Stack Overflow用户

发布于 2018-07-15 18:51:04

我通过从+=文件中删除INCLUDEPATH += /usr/include来解决这个问题。

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51350998

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档