C/C++
Build binaries
Building binaries from source requires installation of cmake and a C compiler such as clang or gcc.
Run the following to get the libqoco.so
shared object file.
- Clone the repository and change directory.
git clone https://github.com/qoco-org/qoco cd qoco
- Make build directory and change directory.
mkdir build cd build
- Compile sources.
cmake .. && make
You should now see two binaries:
libqoco.so
which is the qoco library, andqoco_demo
which solves a sample SOCP. To build unit tests, add-DENABLE_TESTING:BOOL=True
to thecmake
call. Note that when running unit tests, it is required to havecvxpy
installed.
Use with CMake
To use in a CMake project add the following to your CMakeLists.txt
file
add_subdirectory(QOCO_DIRECTORY)
target_link_libraries(yourExecutable qoco)
Where QOCO_DIRECTORY
is the location where qoco
is cloned.