Skip to content

Gurobi Search Path does not include current folder #3773

@sfiruch

Description

@sfiruch

What version of OR-Tools and what language are you using?
Version: 9.6.2534
Language: C#

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Gurobi

What operating system (Linux, Windows, ...) and version?
Windows 11 (22621.1555)

What did you do?

  1. Place gurobi100.dll, gurobi100.NET.dll and gurobi.lic in a folder
  2. Compile and run the following C# program in the same folder:
using var m = Solver.CreateSolver("Gurobi");

What did you expect to see
No error message

What did you see instead?

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1683214867.234411    6748 linear_solver.cc:644] Support for Gurobi not linked in, or the license was not found.

Only when I copy the libraries to the folder C:\Program Files\gurobi1000\win64\bin, the application works without error. Apparently, the application searches in these hardcoded paths for the Gurobi libraries, but not the current directory:
image

Anything else we should know about your project / environment
It's common practice under Windows to colocate DLLs with the application executable.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions