gurobi_c++.h: No such file or directory

2,233 views
Skip to first unread message

Sabrina Richter

unread,
Sep 28, 2017, 7:17:25 AM9/28/17
to Gurobi Optimization
Hello guys,

(sry for my bad english: )
since yesterday I try to install Gurobi on my laptop using linux. I followed the Gurobi Optimizer Quick Start Guide and came now across the problem, that when trying to compile the test programm mip1_c++.cpp, my terminal claims "gurobi_c++.h:  No such file or directory. compilation terminated."
I already included
"export         GRB_LICENSE_FILE=/usr/home/ina/gurobi.lic
export           GUROBI_HOME="/opt/gurobi751/linux64"
export           PATH="${PATH}:${GUROBI_HOME}/bin"
export         LD_LIBRARY_PATH="${GUROBI_HOME}/lib""
at the end of my .bashrc file.

Pleeeeeaase help me!

Michael Winkler

unread,
Sep 28, 2017, 11:45:46 AM9/28/17
to Gurobi Optimization
How do you compile the mip1_c++.cpp example? Do you use the Makefile that comes with our distribution?

Not finding the necessary C++ header means that there is a missing include when compiling the example.For example:

g++ -m64 -g -o mip1_c++ ../c++/mip1_c++.cpp -I../../include/ -L../../lib/ -lgurobi_c++ -lgurobi75 -lm

would be executed when doing a "make mip1_c++" in /opt/gurobi751/linux64/examples/build. This should work, also here you can see the "-I../../include/" which says where to search for additional header files.


Best,
Michael
Reply all
Reply to author
Forward
0 new messages