Skip to content
General-purpose C++0x static library
C++ Java Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
include/mgpcl * Fixes for Serial and STDInputStream Jul 2, 2019
net-logger + NetLogger enhancements Mar 30, 2019
src * Fixes for Serial and STDInputStream Jul 2, 2019
test * Fixed HTTPServer no taking MGPCL_NO_SSL into account May 11, 2019
.gitignore * Mainly JSON fixes Dec 31, 2018
CMakeLists.txt * Patterns are now disabled by default (expermiental feature) May 11, 2019
MGPCL.sln * Fixes for Serial and STDInputStream Jul 2, 2019
MGPCL.vcxproj * Bad math in Matrix4 May 7, 2019
RandomDistribution.xlsx * Now using OpenSSL's PRNG to generate AES key in Misc test Apr 11, 2018


What is it?

This is a static general purpose C++0x library I've been working on. It works on both Linux and Windows, and provides a few basic things you might need in a C++ project, like basic containers (Lists, Maps), threading primitives, message boxes, internet basics (sockets and HTTP requests), etc... It also has OpenSSL wrappers for crypto and well... SSL...




  • OpenSSL (for crypto and SSL)
  • gtk3 (Linux only; for message boxes)

Both of these dependencies can be disabled through CMake using MGPCL_ENABLE_GUI and MGPCL_ENABLE_SSL


MGPCL uses CMake under Linux. It may work on Windows but you'll have to add OpenSSL manually to the build; it is better to use the provided VS solution file. Anyway, on Linux, simply run:

git clone
cd mgpcl
cmake .

Why not boost?

Boost would be indeed a better choice. One could say I re-invented the wheel. But I wanted to make my own library, where I can easily add whatever I want, with my coding style. I also believe I learned a few things by writing this library, and I'm pretty sure that knowing how your stuff works makes you 'performance-aware' (like, what is slow, under which circumstances, what would be better etc...) TL;DR: Not the best, but this is what I want to work with.

Functionality list

  • Containers (String, List, HashMap, FlatMap, Queue, Variant, SharedPtr, Bitfield)
  • Threading (Thread, Mutex, Atomic, Cond, RWLock)
  • Math (Complex, FFT, Vectors, Matrix, Quaternion, Ray, Shapes)
  • IO with Java-like stream system
  • OS Interaction (File & dirs, Processes, SerialIO, Shared objects, Console/terminal utils, CPU Infos)
  • Parsing misc (JSON, INI-like configs, Program args)
  • Logging (Basic logger, logging over network)
  • Internet (Sockets, SSLSockets, TCPServer, TCPClient, Packet system, HTTP requests)
  • GUI (Message boxes, very basic Window management [Window class has been removed])
  • Crypto (OpenSSL wrappers for Big Numbers, HMAC, AES, RSA, SHA)
  • and others (Date, Nifty counter macros, Random, basic signal & slot system, Singletons, Time handling, CRC32, Base64, etc..)


  • Patterns (aka Regexp)
  • ZLib and LZ4 compression I/O streams
  • Networking: Complete UDP model
  • SSL Certificate Management
  • RSA: Export keys to PEM
  • Noise techniques (Perlin?)
  • Shapes: Cylinder & cube
  • RoundRobin class
  • Faster & better FFT
  • DLL/SO build
  • The aim is to NOT to make the stdlib/stl useless but rather to complete it with some features I really need for my projects.
You can’t perform that action at this time.