编译错误LEDA 6.1

时间:2018-06-06 14:06:08

标签: c++ c leda

我正在尝试编译简单的Hello World!在我的部门的UNIX系统上使用LEDA 6.1从本教程LEDA Tutorial, section 1.3编写。

#include <LEDA/core/string.h>
#include <iostream>

using leda::string;
using std::cout;

int main ()
{

    string msg = "Hello World!";
    cout << msg << "\n";

}

设置环境变量

之后
LEDAROOT = /usr/local/LEDA-6.1
export LEDAROOT

我尝试编译包含高位代码

的文件leda1.c
g++ -c leda1.c -I$LEDAROOT/incl

我得到了一些错误:

In file included from /usr/local/LEDA-6.1/incl/LEDA/system/basic.h:70,
                 from /usr/local/LEDA-6.1/incl/LEDA/core/string.h:16,
                 from leda1.c:1:
/usr/local/LEDA-6.1/incl/LEDA/system/misc.h: In function ‘int leda::Max_Value(int&)’:
/usr/local/LEDA-6.1/incl/LEDA/system/misc.h:120: error: ‘INT_MAX’ was not declared in this scope
/usr/local/LEDA-6.1/incl/LEDA/system/misc.h: In function ‘int leda::Min_Value(int&)’:
/usr/local/LEDA-6.1/incl/LEDA/system/misc.h:121: error: ‘INT_MAX’ was not declared in this scope

任何人都可以帮我解决这个问题吗?

0 个答案:

没有答案