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.so
file from the/build/bin
directory and thecppx.h
file from the/include
directory, 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 [email protected]: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.so
andheader.h
into the same directory as youryourFile.cpp
. -
Include
header.h
file in your cpp file using#include "header.h"
. -
With your file named yourFile.cpp run the following command making sure that
lib-cppx.so
is 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.