https://github.com/chronoxor/cppcommon
Cross-platform C++ common library for Linux, OSX, Windows, Cygwin, MinGW
https://github.com/chronoxor/cppcommon
common-library
Last synced: 5 months ago
JSON representation
Cross-platform C++ common library for Linux, OSX, Windows, Cygwin, MinGW
- Host: GitHub
- URL: https://github.com/chronoxor/cppcommon
- Owner: chronoxor
- License: mit
- Created: 2016-09-23T15:24:19.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2026-02-27T14:11:09.000Z (5 months ago)
- Last Synced: 2026-02-27T19:21:34.280Z (5 months ago)
- Topics: common-library
- Language: C++
- Homepage:
- Size: 74.6 MB
- Stars: 304
- Watchers: 14
- Forks: 86
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CppCommon
[](LICENSE)
[](https://github.com/chronoxor/CppCommon/releases)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-linux-clang.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-linux-gcc.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-macos.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-cygwin.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-msys2.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-mingw.yml)
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-vs.yml)
C++ Common Library contains reusable components and patterns for error and
exceptions handling, filesystem manipulations, math, string format and
encoding, shared memory, threading, time management and others.
[CppCommon API reference](https://chronoxor.github.io/CppCommon/index.html)
# Contents
* [Features](#features)
* [Requirements](#requirements)
* [How to build?](#how-to-build)
# Features
* Cross platform (Linux, MacOS, Windows)
* Exception handling model
* Filesystem manipulations
* String encoding converters
* String format using [{fmt} library](http://fmtlib.net)
* CPU, memory, environment
* Shared memory
* Stack trace
* UUID generator
* Thread extensions (priority, affinity, yield)
* Thread barrier, latch
* Synchronization primitives
* Named synchronization primitives
* Producer/consumer queues
* Time management
* Utilities
# Requirements
* Linux
* MacOS
* Windows
* [cmake](https://www.cmake.org)
* [gcc](https://gcc.gnu.org)
* [git](https://git-scm.com)
* [gil](https://github.com/chronoxor/gil.git)
* [python3](https://www.python.org)
Optional:
* [clang](https://clang.llvm.org)
* [CLion](https://www.jetbrains.com/clion)
* [Cygwin](https://cygwin.com)
* [MSYS2](https://www.msys2.org)
* [MinGW](https://mingw-w64.org/doku.php)
* [Visual Studio](https://www.visualstudio.com)
# How to build?
### Linux: install required packages
```shell
sudo apt-get install -y binutils-dev uuid-dev
```
### Install [gil (git links) tool](https://github.com/chronoxor/gil)
```shell
pip3 install gil
```
### Setup repository
```shell
git clone https://github.com/chronoxor/CppCommon.git
cd CppCommon
gil update
```
### Linux
```shell
cd build
./unix.sh
```
### MacOS
```shell
cd build
./unix.sh
```
### Windows (Cygwin)
```shell
cd build
unix.bat
```
### Windows (MSYS2)
```shell
cd build
unix.bat
```
### Windows (MinGW)
```shell
cd build
mingw.bat
```
### Windows (Visual Studio)
```shell
cd build
vs.bat
```