0

我正在尝试编译简单的 Hello World!本教程中的程序LEDA 教程,第 1.3 节在我部门的 UNIX 系统上使用 LEDA 6.1。

#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

谁能帮我解决这个问题?

4

0 回答 0