I cannot run Gurobi mip example in C++ (CLion) fatal error: 'gurobi_c++.h' file not found

684 views
Skip to first unread message

xz2...@columbia.edu

unread,
Jun 27, 2018, 4:30:20 PM6/27/18
to Gurobi Optimization
Hello.. I installed the right Gurobi and the update license. I try to run mip1_c++.cpp. When I run this file in Clion. It told me that 


fatal error: 'gurobi_c++.h' file not found
#include "gurobi_c++.h"


I believe that it is something about initialization, in order to let the directory of gurobi_c++.h file in the include directory. However, it does not say anything about how to do that in the Gurobi documentation. I am completely illiterate in dealing with argument in Terminal(I use MAC OS).. Can anyone tell me how can I run the mip1_c++.cpp file in Clion ??

Best,
Ethan  

Robert Luce

unread,
Jun 27, 2018, 11:42:27 PM6/27/18
to Gurobi Optimization
Hi Ethan,

it seems to me that CLion doesn't know about the path to Gurobi's include directory; in a typical installation on a mac that would be

/Library/gurobi801/mac64/include/

(your version number may be different). You need to setup CLion to search this directory for include files.  I am not a CLion user, but the tutorial https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html explains how to achieve this in section "Specifying header search paths".

Robert
Reply all
Reply to author
Forward
0 new messages