We want to make the C++ API compatible with as many different compilers and compiler versions as possible. To avoid shipping an even larger number of pre-compiled binaries, we provide source files for the API so you can build the library yourself using your compiler of choice. Please also consult our documentation on building C++ examples.
In case the linking process causes "undefined reference" errors like these
undefined reference to `GRBModel::addVar(double, double, double, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
undefined reference to `GRBModel::addConstr(GRBTempConstr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
undefined reference to `GRBVar::get[abi:cxx11](GRB_StringAttr) const'
you should recompile the C++ library for the API and replace the old one to resolve any ABI incompatibilities:
cp libgurobi_c++.a ../../lib/