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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

(9b) Click on ”C/C++” and ”Preprocessor” and add ";<strong>LEDA</strong> DLL" in ”Preprocessor Definitions”.<br />

(10) Click on ”Linker” and ”Command Line” and add the name of the <strong>LEDA</strong> libraries<br />

you want to use in ”Additional Options” as follows. We use to indicate the<br />

compiler option chosen in Step (9) (, e.g., is mld for ”/MLd”).<br />

• leda .lib<br />

for programs that do not use GeoWin<br />

• libGeoW .lib leda .lib<br />

for programs using GeoWin<br />

Alternatively, you can include in your program and<br />

the correct <strong>LEDA</strong> libraries are linked to your program automatically. If GeoWin is<br />

used you need to add " LINK GeoW" to the ”Preprocessor definitions” in Step (9).<br />

(11) Click ”OK” to leave the ”Settings”<br />

(12) In the ”Tools” menu click on ”Options”<br />

(13) Click on ”Projects–¿VC++ Directories”<br />

(14) Choose ”Include Files” in ”Show Directories for:” and add the directory<br />

\incl containing the <strong>LEDA</strong> include files (Double click on the small rectangle<br />

in ”Directories”, enter \incl, or click on the small grey rectangle on<br />

the right and choose the correct directory.)<br />

(15) Choose ”Library Files” in ”Show Directories for:” and add the directory <br />

containing the <strong>LEDA</strong> libraries.<br />

(16) Click ”OK” to leave the ”Options”<br />

(17) In the ”Build” menu click on ”Build ¡Project¿ ” or ”Rebuild ¡Project¿” to compile<br />

your program.<br />

(18) To execute the program ”prog.exe” Windows needs to have leda .dll in its<br />

search path for DLL’s. <strong>The</strong>refore, you need to do one of the following.<br />

• Copy leda .dll to the bin\ subdirectory of your compiler or the directory<br />

containing ”prog.exe”.<br />

• Alternatively, you can set the environment variable PATH to the directory containing<br />

leda .dll as described below.<br />

(19) In the ”Build” menu click on ”Execute prog.exe” to execute your program.<br />

Remark: If your C++ source code files has extension .c, you need to add the option ”/TP”<br />

in ”Project Options” (similar to Step (9)), otherwise you will get a number of compiler<br />

errors. (Click on ”C/C++” and ”Command Line”. Add /TP in ”Additional Options” and<br />

click ”Apply”.)

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

Saved successfully!

Ooh no, something went wrong!