If you already understand that kv is header-only, requires C++ and Boost, and may require MPFR depending on what you use, you probably do not need to read the rest of this page.
LICENSE.txt README.txt example kv testThe actual library is the kv directory. Copy it to an appropriate location. On Unix-like systems, a typical location is /usr/local/include. Since the library is small, it is also fine to keep it together with your working directory. If you install it somewhere other than a location that the compiler searches automatically, such as /usr/include or /usr/local/include, specify the installation location at compile time with an option such as:
-I. -I/home/username/include
sudo apt install build-essential sudo apt install libboost-all-dev (sudo apt install libmpfr-dev)For Red Hat-based distributions such as Fedora:
sudo dnf install gcc-c++ sudo dnf install boost-devel (sudo dnf install mpfr-devel)
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
brew install gcc brew install boost (brew install mpfr)
vcpkg new --application vcpkg add port boost (vcpkg add port mpfr) vcpkg installThe libraries will be installed in vcpkg_installed. This takes a long time.
c++ -O3 -DNDEBUG -I.. test-interval.ccFor programs that use MPFR:
c++ -O3 -DNDEBUG -I.. test-impfr.cc -lmpfr
g++-15 -O3 -DNDEBUG -I.. test-interval.ccFor programs that use MPFR:
g++-15 -O3 -DNDEBUG -I.. test-impfr.cc -lmpfr
cl /EHsc /O2 /I.. /I../vcpkg_installed/x64-windows/include test-interval.ccFor programs that use MPFR, the DLL directory must be added to PATH first:
set PATH=%PATH%;../vcpkg_installed/x64-windows/binThen run:
cl /EHsc /O2 /I.. /I../vcpkg_installed/x64-windows/include test-impfr.cc /link /LIBPATH:../vcpkg_installed/x64-windows/lib mpfr.lib