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.

(7) Double click on prog.cpp<br />

If you want to enter a new source file:<br />

(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++” and enter in ”Project Options” the compiler flag you want to use.<br />

<strong>The</strong> default value is ”/MLd”, alternatives are ”/ML”, ”/MD”, ”/MDd”, ”/MT”,<br />

and ”/MTd”. Notice that you have to use the <strong>LEDA</strong> libraries that correspond to<br />

the chosen flag, e.g., with option ”/MD” you must use libl md.lib, libg md.lib,<br />

libp md.lib, libw md.lib, libgeow md.lib, and libd3 md.lib. Using another<br />

set of libraries with ”/MD” could lead to serious linker errors.<br />

(10) Choose ”Linker” and add the name of the <strong>LEDA</strong> libraries 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 />

• libl .lib<br />

for programs using only basic data types of <strong>LEDA</strong><br />

• libg .lib libl .lib<br />

for programs using graph data types<br />

• libp .lib libg .lib libl .lib<br />

for programs using geometric data types<br />

• libd3 .lib libp .lib libg .lib libl .lib<br />

wsock32.lib<br />

for programs using three-dimensional data types<br />

• libw .lib libp .lib libg .lib libl .lib<br />

wsock32.lib<br />

for programs using graphics data types<br />

• libgeow .lib libd3 .lib libw .lib libp .lib<br />

libg .lib libl .lib wsock32.lib<br />

for programs using GeoWin<br />

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

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

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

Notice that autolink static.h only works correctly for the GUI package of <strong>LEDA</strong>.<br />

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

(12) In the ”Extras” menu click on ”Options”

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

Saved successfully!

Ooh no, something went wrong!