I'm observing this error in 8.1 after my recent install. I tried the method below. It didn't work. I tried the suggestion given in the documentation:
under "Building and running the example" -- but make mip1_c++ throws the following errors:
g++ -m64 -g -o mip1_c++ ../c++/mip1_c++.cpp -I../../include/ -L../../lib -lgurobi_c++ -lgurobi81 -lm
/tmp/ccbEODMY.o: In function `main':
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:25: undefined reference to `GRBModel::addVar(double, double, double, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:26: undefined reference to `GRBModel::addVar(double, double, double, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:27: undefined reference to `GRBModel::addVar(double, double, double, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:35: undefined reference to `GRBModel::addConstr(GRBTempConstr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:39: undefined reference to `GRBModel::addConstr(GRBTempConstr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:45: undefined reference to `GRBVar::get[abi:cxx11](GRB_StringAttr) const'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:47: undefined reference to `GRBVar::get[abi:cxx11](GRB_StringAttr) const'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:49: undefined reference to `GRBVar::get[abi:cxx11](GRB_StringAttr) const'
/home/swaprava/Downloads/gurobi8.1.0_linux64/gurobi810/linux64/examples/build/../c++/mip1_c++.cpp:56: undefined reference to `GRBException::getMessage[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
Makefile:84: recipe for target 'mip1_c++' failed
make: *** [mip1_c++] Error 1
There isn't any other online support for this problem, hence I'm getting in touch through email. I have installed gurobi properly and installed the license too.
Swaprava