我正在尝试使用{p> 3编译Gurobi示例
g++ dense_cpp.cpp -I $GUROBI_HOME/include
其中$GUROBI_HOME
是我的Gurobi安装目录的主目录。我收到以下错误:
Undefined symbols for architecture x86_64:
"GRBLinExpr::GRBLinExpr(double)",referenced from:
dense_optimize(GRBEnv*,int,double*,char*,double*) in dense_cpp-1ed621.o
"GRBLinExpr::operator+=(GRBLinExpr const&)",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)
有人知道如何解决此问题吗?