I'm trying to compile this Gurobi example using
g++ dense_cpp.cpp -I $GUROBI_HOME/include
where $GUROBI_HOME is the home directory of my Gurobi installation. I'm getting the following errors:
Undefined symbols for architecture x86_64:
"GRBLinExpr::GRBLinExpr(double)", referenced from:
dense_optimize(GRBEnv*, int, int, double*, double*, double*, char*, double*, double*, double*, char*, double*, double*) in dense_cpp-1ed621.o
"GRBLinExpr::operator+=(GRBLinExpr const&)", referenced from:
dense_optimize(GRBEnv*, int, int, double*, double*, double*, char*, double*, double*, double*, char*, double*, double*) in dense_cpp-1ed621.o
[...]
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to fix this?