To build and run the example, we refer the user to the files in
<installdir>/examples/build
.
This directory contains C++_examples_2015.sln, C++_examples_2017.sln,
and C++_examples_2019.sln
(Visual Studio 2015, 2017, and 2019
solution files for the C++ examples). Double-clicking on the solution
file will bring up Visual Studio. Clicking on the mip1_c++ project, and then selecting Run from the Build menu will compile and run the example.
If you want to create your own project or makefile to build a C++ program that calls Gurobi, the details will depend on your platform and development environment, but we'd like to point out a few common pitfalls:
The C++ example directory <installdir>/examples/c++
contains a
number of examples. We encourage you to browse and modify them in
order to become more familiar with the Gurobi C++ interface. We
also encourage you to read the
Gurobi Example Tour
for more information.