Skip to main content

undefined reference

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • David Torres Sanchez
    • Gurobi Staff

    Hi Samira,

    It looks like you have to recompile the library: How do I resolve "undefined reference" errors while linking Gurobi in C++?

    Cheers, 
    David

    0
  • David Torres Sanchez
    • Gurobi Staff

    Also, it seems that you have forgotten to import the library. Just add \(\texttt{-lgurobi100 -lgurobi_c++}\).

    Cheers, 
    David

    0
  • Samira Fallah
    • Gurobi-versary
    • Conversationalist
    • First Question

    I have been able to successfully compile utilizing:

    g++ test.cpp -o main -I../../../../software/gurobi1000/linux64/include -L../../../../software/gurobi1000/linux64/lib -lgurobi100 -lgurobi_c++

    Thanks!

    0

Post is closed for comments.