メインコンテンツへスキップ

Question about a compilation error in a file where I've written #include <gurobi_c++.h>.

回答済み

コメント

2件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi,

    Can you try the following command in your terminal?

    g++ -o mip1_c++.cpp -o mip1_c++ -I/opt/gurobi1103/linux64/include/ -L/opt/gurobi1103/linux64/lib -lgurobi_c++ -lgurobi110

    The part in bold is linking the Gurobi C++ library and the Gurobi C library

    This should produce an executable called mip1_c++ which you can then run

    - Riley

    0
  • 悠太 萩原
    • First Comment
    • First Question

    Thank you for your kind advice!!


    I ran the following command and it worked fine!!

    g++ -o mip1_c++ mip1_c++.cpp -I/opt/gurobi1103/linux64/include/ -L/opt/gurobi1103/linux64/lib -lgurobi_c++ -lgurobi110

    Thank you for your continued support.

    0

サインインしてコメントを残してください。