0

I am trying to compile the simple Hello World! program from this tutorial LEDA Tutorial, section 1.3 using LEDA 6.1 on the UNIX system of my department.

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

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

int main ()
{

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

}

After setting the environment variable

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

I try to compile the file leda1.c containing the upper code

g++ -c leda1.c -I$LEDAROOT/incl

I get some errors witch are:

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

Can anyone help me with this problem?

Statik Stasis
  • 308
  • 1
  • 5
  • 16
Nn Kk
  • 1
  • 2

0 Answers0