Errors when using Gurobi with eclipse and C++
AnsweredIn my Gurobi folder I have 3 folders, that in my opinion are important: include (with .h files), lib (with .lib files and NO .so or .a files) and src (with .cpp & .h files).
include: I added the path to this folder to C/C++ Build -> Settings -> Cygwin C++ Compiler -> Includes -> Include paths, I guess this is for the compiler to see the .h files. I also added it to C/C++ General -> Paths and Symbols -> Includes -> Include directories, I guess this is for the linker to see the .h files.
lib: I first added the folder path to C/C++ Build -> Settings -> MinGW C++ Linker -> Libraries -> Libraries (-l), however after searching online it seems to me this option only works for libraries with standard names and extensions.
It also gave me lots of errors about undefined reference to `GRBfreebatch', and so on.
Is there a way to use Gurobi with eclipse and C++? I would greatly appreciate even if someone just pointed out mistakes in my understanding.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
It is possible that you might have to recompile the C++ API library for compiler compatibility, see How do I resolve "undefined reference" errors while linking Gurobi in C++?
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments