문제

I use qtcreator and gurobi.

I get an error: unable to open file ligburobi50.so.

I checked and the file is there, I even gave it 777 permission, to no avail. Any ideas what is going on here?

This is the QTcreator project file:

# -------------------------------------------------
# Project created by QtCreator 2011-10-18T10:38:12
# -------------------------------------------------
TARGET = Forum
QT       -= gui


CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app

INCLUDEPATH += /opt/gurobi500/linux64/include
LIBS += -L /opt/gurobi500/linux64/lib -lgurobi_c++ -lgurobi50 -lpthread

SOURCES += main.cpp

I know I have little information, but this is actually on a computer of a colleague of mine who is abroad and I have to run this code by tomorrow. Thanks!

도움이 되었습니까?

해결책 2

Added the following lines to .bashrc

export GUROBI_HOME="/opt/gurobi550/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib:/opt/boost_1_54_0/lib"
export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/opt/boost_1_54_0/include"
#export GRB_LICENSE_FILE=/media/Software/Licenses/Gurobi/gurobi.lic

And that fixed it.

다른 팁

The message "no license code" is coming from the gurobi library being called by your program. You are properly compiling and linking to all the shared libraries. The gurobi library checks for a license key file (gurobi.lic). By default gurobi will check in your home directory and in /opt/gurobi550/. If the file is in another place, or you want to name it something other than gurobi.lic, you can set the environment variable GRB_LICENSE_FILE.;

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top