Precompiled platform-dependent shared and static libraries are available on Bintray.
We here assume that the user uncompressed each archive to
Each archive contains static
OSQP_FOLDER/lib/libosqp.a and shared
OSQP_FOLER/lib/libosqp.ext libraries to be used to interface OSQP to any C/C++ software.
.ext is platform dependent and is
.so for Linux,
.dylib for Mac and
.dll for Windows.
The required include files can be found in
Simply compile with the linker option with
The OSQP libraries can also be compiled from sources. For more details see Build from sources.
Including OSQP in CMake projects¶
If you compiled OSQP from sources and followed the CMake installation instructions in Install the binaries section, you can include the package in another CMake project with the following lines depending on whether you need a shared or a static library
# Find OSQP library and headers find_package(osqp REQUIRED) # Link the OSQP shared library target_link_libraries(yourTarget PRIVATE osqp::osqp) # or... # Link the OSQP static library target_link_libraries(yourTarget PRIVATE osqp::osqpstatic)