Install via a package manager
HiGHS can be installed using a package manager in the cases of
These binaries are provided by the Julia community and are not officially supported by the HiGHS development team. If you have trouble using these libraries, please open a GitHub issue and tag
@odow in your question.
Precompiled static executables are available for a variety of platforms at
Each download includes library files for linking to external projects and a stand-alone executable.
To install a precompiled binary, download the appropriate
.tar.gz file and extract the executable located at
- For Windows users: if in doubt, choose the file ending in
- For M1 macOS users: choose the file ending in
- For Intel macOS users: choose the file ending in
Compile from source
HiGHS uses CMake as build system, and requires at least version 3.15. After extracting HiGHS from GitHub, setup a build folder and call CMake as follows:
$ mkdir build $ cd build $ cmake ..
Then compile the code using:
$ cmake --build .
To test whether the compilation was successful, run
HiGHS is installed using the command
$ cmake --install .
This installs the library in
lib/, as well as all header files in
include/highs/. For a custom installation in
$ cmake -DCMAKE_INSTALL_PREFIX=install_folder .
$ cmake --install .
To use the library from a CMake project use
and add the correct path to HIGHS_DIR.
By default, CMake builds the debug version of the binaries. These are generated in a directory
Debug. To build a release version, add the option
cmake -S . -B build cmake --build build --config Release
It is also possible to specify a specific Visual studio version to build with:
cmake -G "Visual Studio 17 2022" -S . -B build cmake --build build
When building under Windows, some extra options are available. One is building a 32 bit version or a 64 bit version. The default build is 64 bit. To build 32 bit, the following commands can be used from the
cmake -A Win32 -S . -DFAST_BUILD=OFF -B buildWin32 cmake --build buildWin32
Another thing specific for windows is the calling convention, particularly important for the HiGHS dynamic library (dll). The default calling convention in windows is cdecl calling convention, however, dlls are most often compiled with stdcall. Most applications which expect stdcall, can't access dlls with cdecl and vice versa. To change the default calling convention from cdecl to stdcall the following option can be added
cmake -DSTDCALL=ON -S . -DFAST_BUILD=OFF -B build cmake --build build
An extra note. With the legacy
-DFAST_BUILD=OFF, under windows the build dll is called
highs.dll however the exe expects
libhighs.dll so a manual copy of
libhighs.dll is needed. Of course all above options can be combined with each other.