CPPX is currently a Linux-only C++ shared library that implements utility functions complementing the STL for GNU toolchains.
- Linux distribution
- GNU-compatible C/C++ compiler
- CMake
- git
- Ubuntu/Debian
sudo apt update
sudo apt install build-essential cmake git- Fedora/RHEL
sudo dnf install cmake git- Arch Linux
sudo pacman -S cmake git- Download the
lib-cppx.sofile from the/build/bindirectory and thecppx.hfile from the/includedirectory, then move them to the folder where you plan to compile your C++ source file.
CPPX/
├── build/
│ └── bin/
│ └── lib-cppx.so
└── include/
└── cppx.h
- Clone the repository and enter the project root.
git clone git@github.com:IFKabir/CPPX.git
cd CPPX- Create a build directory and configure with CMake.
mkdir -p build && cd build
cmake ..- Build the shared library.
make- You now can find .so file and .h file in
CPPX/
├── build/
│ └── bin/
│ └── lib-cppx.so
└── include/
└── cppx.h
-
Copy both
lib-cppx.soandheader.hinto the same directory as youryourFile.cpp. -
Include
header.hfile in your cpp file using#include "header.h". -
With your file named yourFile.cpp run the following command making sure that
lib-cppx.sois in the same directory as the executable when you run it.
g++ -std=c++17 yourFile.cpp \
./lib-cppx.so \
-Wl,-rpath=. \
-o app- Run the generated executable
./app- See the corresponding release that was published.