31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiling and Linking Application Programs in a DOS-Box<br />

(a) Setting the Environment Variables for Visual C++:<br />

<strong>The</strong> compiler CL.EXE and the linker LINK.EXE require that the environment variables<br />

PATH, INCLUDE, and LIB have been set properly.<br />

When Visual C++ was installed, setup created a batch file, VSVARS32.BAT, containing<br />

commands to modify PATH, LIB, and INCLUDE. Run VSVARS32.BAT at the command<br />

prompt before you compile your application program. VSVARS32.BAT is located in<br />

the \bin subdirectory of your compiler installation, e.g., c:\programs\microsoft<br />

visual studio .NET\Vc7\bin.<br />

To compile programs together with <strong>LEDA</strong>, the environment variables PATH, LIB,<br />

and INCLUDE must additionally contain the corresponding <strong>LEDA</strong> directories.<br />

(b) Setting Environment Variables for <strong>LEDA</strong>:<br />

(i) Windows NT/2000/XP:<br />

1. In the ”Start” menu, point to ”Settings”, then click ”Control Panel”.<br />

2. In the ”Control Panel”, double click ”System”.<br />

3. In the System Properties dialog box, click the Environment tab (for NT),<br />

respectively the Extended tab and then on ”Environment Variables” (for<br />

2000/XP).<br />

If a user variable PATH, LIB, or INCLUDE already exists, extend the current<br />

value as follows:<br />

• extend PATH by <br />

• extend INCLUDE by \incl<br />

• extend LIB by <br />

Otherwise add new a user variable PATH, INCLUDE, or LIB with value<br />

, respectively \incl.<br />

(ii) Windows 95/98:<br />

1. Change the file autoexec.bat as follows:<br />

If a variable PATH, INCLUDE, or LIB is already set, append the appropriate<br />

<strong>LEDA</strong> directory , respectively \incl.<br />

Otherwise add a corresponding line to autoexec.bat:<br />

set PATH=<br />

set INCLUDE=\incl<br />

set LIB=<br />

2. Restart Windows 95/98 for the change to take effect.<br />

After these procedures, it suffices to call VSVARS32.BAT at the command prompt.<br />

In both cases the <strong>LEDA</strong> paths are automatically appended to the compiler paths.<br />

(c) Compiling and Linking Application Programs:<br />

After setting the environment variables, you can use the <strong>LEDA</strong> libraries as follows<br />

to compile and link programs.<br />

Programs using basic data types:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!