Remark: This section describes the situation in a GUI package of LEDA.
If you have the geometry, graph, or basic package only the corresponding
libraries are provided.
Then you have to set the environment variable LEDAROOT as follows:
Readme.txt | Readme File |
Install \win32_msc70_lib.txt | txt-version of this section |
incl \ | the LEDA include directory |
man_html \ | HTML version of the LEDA user manual |
The default value is "/MLd", alternatives are "/ML", "/MD", "/MDd", "/MT", and "/MTd". Notice that you have to use the LEDA libraries that correspond to the chosen flag, e.g., with option "/MD" you must use libl_md.lib, libg_md.lib, libp_md.lib, libw_md.lib, libgeow_md.lib, and libd3_md.lib. Using another set of libraries with "/MD" could lead to serious linker errors.
Remark: If your C++ source code files has extension .c, you need to add the option "/TP" in "Project Options" (similar to Step (9)), otherwise you will get a number of compiler errors. (Click on "C/C++" and "Command Line". Add /TP in "Additional Options" and click "Apply".)
To add LEDA to an existing Project in Microsoft Visual C++ .NET, start the Microsoft Visual Studio with your project and follow Steps (8)-(16) above.
To compile programs together with LEDA, the environment variables PATH, LIB, and INCLUDE must additionally contain the corresponding LEDA directories.
If a user variable PATH, LIB, or INCLUDE already exists, extend the current value as follows:
Otherwise add new a user variable PATH, INCLUDE, or LIB with value <LEDA>, respectively <LEDA> \incl.
If a variable PATH, INCLUDE, or LIB is already set, append the appropriate LEDA directory <LEDA>, respectively <LEDA> \incl.
Otherwise add a corresponding line to autoexec.bat:
After these procedures, it suffices to call VSVARS32.BAT at the command prompt. In both cases the LEDA paths are automatically appended to the compiler paths.
Programs using basic data types:
cl <option> -TP prog.c <libl.lib>
Programs using graph data types:
cl <option> -TP prog.c <libg.lib> <libl.lib>
Programs using geometric data types:
cl <option> -TP prog.c <libp.lib> <libg.lib> <libl.lib>
Programs using three-dimensional data types:
cl <option> -TP prog.c <libd3.lib> <libp.lib> <libg.lib> <libl.lib>
Programs using graphics data types:
cl <option> -TP prog.c <libw.lib> <libp.lib> <libg.lib> <libl.lib>\ wsock32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib advapi32.lib
Programs using GeoWin:
cl <option> -TP prog.c <libgeow.lib> <libd3.lib> <libw.lib>\ <libp.lib> <libg.lib> <libl.lib> wsock32.lib user32.lib gdi32.lib\ comdlg32.lib shell32.lib advapi32.libPossible values for <option> are "-ML", "-MLd", "-MD", "-MDd", "-MT", and "-MTd". You have to use the LEDA libraries that correspond to the chosen <option>, e.g., with option "-MD" you must use libl_md.lib, libg_md.lib, .... Using another set of libraries with "-MD" could lead to serious linker errors.
Remark: The option -TP is necessary if the C++ source code files have extension .c. If your files have extension .cpp this option is not necessary.