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.

Automatic Setting<br />

Include header file <strong>LEDA</strong>/msc/autolink dll.h in one of your project’s cpp-files. Depending<br />

on your build environment (Debug or Release build) the correct <strong>LEDA</strong> dll will be<br />

chosen automatically when you build your project. Proceed with step 18 of the manual<br />

setting.<br />

<strong>Manual</strong> Setting<br />

(1) In the ”File” menu of Visual C++ .NET click on ”New–¿Project”.<br />

(2) Choose ”Visual C++ Projects” as project type and ”Win32 Project” as template.<br />

Enter a project name, choose a directory for the project, and click ”OK”<br />

(3) In the Win32 Application Wizard click on ”Application Settings”, choose ”Console<br />

Application” and ”Empty Project”, and click ”Finish”<br />

(4) After clicking ”OK” you have an empty project space<br />

If you already have a source file prog.cpp:<br />

(5) Activate the file browser and add prog.cpp to the main folder of your project<br />

(6) In the Solution Explorer of your project click on ”Source Files” with the right<br />

mouse button, then click on ”Add–¿ Add Existing Item” with the left mouse button<br />

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

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

(5’) In the Solution Explorer of your project click on ”Source Files” with the right<br />

mouse button, then click on ”Add–¿ Add New Item” with the left mouse button.<br />

(6’) Choose ”C++ File” in Templates, enter a name, and click ”Open”.<br />

(7’) Enter your code.<br />

(8) In the Solution Explorer right click on your project and left click on ”Properties”<br />

(9a) Click on ”C/C++” and ”Code Generation” and choose the ”Run Time Library”<br />

(=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<br />

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

libGeoW md.lib. Using another set of libraries with ”/MD” could lead to serious<br />

linker errors.

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

Saved successfully!

Ooh no, something went wrong!