next up previous contents index
Next: Usage of Header Files Up: Technical Information Previous: Source Code on UNIX   Contents   Index

Subsections

Source Code on Windows with MS Visual C++

Source Code Configuration for MS Visual C++

  1. Setting the Environment Variables for Visual C++:
    The compiler CL.EXE and the linker LINK.EXE require that the environment variables PATH, INCLUDE, and LIB have been set properly.
    Therefore, when compiling LEDA, simply open the proper command prompt that comes with the Visual Studio. The environment variables are then set as required. Just start the x86 (when compiling for a 32 bit platform) or the x64 (when compiling for a 64 bit platform) Native Tools Command Prompt.
  2. Go to the LEDA main directory.
  3. Type: lconfig [msc | msc-mt | msc-mt | msc64-mt | msc-mt-15 | msc64-mt-15 ] [dll] [ md | mt | mdd | mtd ]

Remark: When using MS Visual C++to compile LEDA you have to choose msc for 32 bit single-threaded compilation, msc-mt for 32 bit multi-threaded compilation, msc64 for 64 bit single-threaded compilation, and msc64-mt for 64 bit multi-threaded compilation. When using MS Visual Studio 2015 or later Visual Studio versions, you should use msc-mt-15 and msc64-mt-15 respectively. When building an application with LEDA and MS Visual Studio C++ the LEDA library you use depends on the Microsoft C runtime library you intend to link with. Your application code and LEDA both must be linked to the same Microsoft C runtime library; otherwise serious linker or runtime errors may occur. The Microsoft C runtime libraries are related to the compiler options as follows

C Runtime Library Option
LIBCMT.LIB -MT
LIBCMTD.LIB -MTd
MSVCRT.LIB -MD
MSVCRTD.LIB -MDd

In order to get the suitable Libs or DLL please choose the corresponding option in the call of lconfig.

LEDA Compilation with MS Visual C++

Type make_lib for building the object code libraries

static: libleda.lib LEDA library without GeoWin
  libGeoW.lib GeoWin library
     
dynamic: leda.dll, leda.lib  
  libgeow.lib  
Remarks: The current LEDA package supports only the dynamic version; therefore setting dll in the lconfig call is mandatory at the moment. GeoWin is currently not available as a DLL and will always be build as a static library.


Now follow the instructions given in the corresponding section for the Windows object code package (Section WinObjectCodePackage ff.).


next up previous contents index
Next: Usage of Header Files Up: Technical Information Previous: Source Code on UNIX   Contents   Index