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.

(5’) In the ”File” menu click on ”New”<br />

(6’) Choose ”C++ Source File” in ”Files”, fill in the file name, and click ”OK”<br />

(7’) Enter your code<br />

(8) In the ”Project” menu click on ”Settings”<br />

(9) Choose ”C/C++”:<br />

• Enter in ”Project Options” the compiler flag you want to use. <strong>The</strong> default value<br />

is ”/MLd”, alternatives are ”/ML”, ”/MD”, ”/MDd”, ”/MT”, and ”/MTd”.<br />

Notice that you have to use the <strong>LEDA</strong> libraries that correspond to the chosen<br />

flag, e.g., with option ”/MD” you must use leda md.lib and leda md.dll.<br />

Using another library/DLL pair with ”/MD” could lead to serious linker errors.<br />

• Add in ”Preprocessor definitions” the compiler flag "<strong>LEDA</strong> DLL".<br />

(10) Choose ”Linker” and add the name of the <strong>LEDA</strong> library you want to use at the<br />

beginning of line ”Object-/Library-Modules” as follows. We use to indicate<br />

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

• leda .lib<br />

for programs not using 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> library is 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 ”Extras” menu click on ”Options”<br />

(13) Choose ”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 prog.exe” or ”Rebuild All” to compile your<br />

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.

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

Saved successfully!

Ooh no, something went wrong!