ILOG CPLEX 11.0 Getting Started > Tutorials > Callable Library Tutorial > Compiling and Linking Callable Library Applications > Building Callable Library Applications on Win32 Platforms

Building an ILOG CPLEX application using Microsoft Visual C++ Integrated Development Environment, or the Microsoft Visual C++ command line compiler are explained here.

Microsoft Visual C++ IDE

To make an ILOG CPLEX Callable Library application using Visual C++, first create or open a project in the Visual C++ Integrated Development Environment (IDE). Project files are provided for each of the examples found in the directory or folder examples\platform\format where platform and format refer to your type of machine and compiler. For details about the build process, refer to the information file msvc.html, which is found in the top of the installed ILOG CPLEX directory structure.

Note
The distributed application must be able to locate CPLEX110.dll at run time.

Microsoft Visual C++ Command Line Compiler

If the Visual C++ command line compiler is used outside of the IDE, the command should resemble the following example. The example command assumes that the file cplex110.lib is in the current directory with the source file lpex1.c, and that the line in the source file "#include <ilcplex/cplex.h>" correctly points to the location of the include file or else has been modified to do so (or that the directories containing these files have been added to the environment variables LIB and INCLUDE respectively).

cl lpex1.c cplex110.lib

This command will create the executable file lpex1.exe.

Using Dynamic Loading

Some projects require more precise control over the loading and unloading of DLLs. For information on loading and unloading DLLs without using static linking, please refer to the compiler documentation or to a book such as Advanced Windows by Jeffrey Richter from Microsoft Press. If this is not a requirement, the static link implementations already mentioned are easier to use.