A list of open source C++ libraries
From cppreference.com
The objective of this page is to build a comprehensive list of open source C++ libraries, so that when one needs an implementation of particular functionality, one needn't to waste time searching on web (DuckDuckGo, Google, Bing etc.).
If you know a library that might be useful to others, please add a link to it here. There are no restrictions on what can be included except that the source of the library must be readily available to download.
The page is provided 'as is' - with the hope of being useful, but without any warranties. Outdated, misleading or wrong links might appear here. If you've noticed one of these, it would be great if you fixed the error.
[edit] Generic
- Boost - large collection of generic libraries (Boost License)
- GSL - Guidelines Support library implementation, recommended by Bjarne Stroustrup, Herb Sutter and Co in C++ Core Guidelines
- BDE - The Bloomberg Development Environment core libraries from Bloomberg L.P. (Apache License)
- Dlib - networking, threads, graphical interfaces, data structures, linear algebra, machine learning, XML and text parsing, numerical optimization, Bayesian nets, and numerous other tasks (Boost License)
- JUCE - An extensive, mature, cross-platform C++ toolkit (GPL License)
- Loki - design patterns
- Reason - xml, xpath, regex, threads, sockets, http, sql, date-time, streams, encoding and decoding, filesystem, compression (GPL License)
- yomm2 - Open multi-methods for C++17 (Boost License)
- Folly - Facebook open-source library. Library of C++11 components designed with practicality and efficiency in mind.
- Abseil - An open-source collection of C++ library code from Google designed to augment the C++ standard library.
- cxxomfort - Backports of C++ features (C++11 to C++03 and C++1y proposals to C++11/C++03).
- libsourcey - Cross-platform C++11 library for high speed networking and media encoding. HTTP, WebSockets, TURN, STUN, Symple and more...
- OnPosix - C++ library providing several abstractions (e.g., threading, networking, logging, IPC, etc.) on POSIX platforms.
- Ultimate++ - Cross-platform rapid application development framework
- CAF - The C++ Actor Framework (CAF) is an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more (BSD License).
- cpp-mmf - A C++98 library that encapsulates memory-mapped-files for POSIX or Windows
- CommonPP - Multi-purpose library with a strong emphasis on getting metrics out of a project. (BSD)
- Better Enums - Reflective enums (enum to string, iteration, etc.) with constexpr support. (BSD)
- Smart Enum - "to_string", "from_string" and more for your enums. (Boost License)
- nytl - Generic C++17 header-only utility template library. (Boost License)
- SaferCPlusPlus - SaferCPlusPlus - Safe compatible substitutes for unsafe C++ primitives, including pointers, int and std::vector. (Boost License)
- fcppt - Freundlich's C++ Toolkit (fcppt) is a collection of libraries focusing on improving general C++ code by providing better types and making use of functional programming.
- bitfield.h - Bit field structure facility, more portable/flexible than the base language facility.
- composite_op.h - Basic class data member introspection, cumbersome and often non-re-entrant, but sometimes useful.
- Abstract Intrusive Containers - More flexible than boost::intrusive, but not STL-compatible.
- Yato - Modern C++(14/17) cross-platform STL-styled and STL-compatible library with implementing containers, ranges, iterators, type traits and other tools and experiments (MIT License)
- Kangaru - A dependency injection container for C++11 and C++14 (MIT License)
- yaal - algorithms, collections, arbitrary precision calculation, generic-DSL grammar driven parsers and more (CC BY-ND-NC 4.0)
[edit] Communication
- libnavajo - a light but powerful API including http server for web and RESTful application development, supporting SSL, authentification, cookies and session management, including Websocket server support... (LGPL License)
- C++ RESTful framework - C++ micro-framework designed to be embedded into a wide range of applications.
- C++ REST SDK - asynchronous HTTP client and listener, asynchronous Stream, URI, JSON
- cpr - a modern C++ HTTP requests library
- cpp-netlib - cpp-netlib: The C++ Network Library
- cpp-redis - C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform.
- tacopie - C++11 TCP Library
- Boost.Asio - asynchronous and synchronous networking, timers, serial I/O
- Boost.Beast - HTTP and WebSocket library built on top of Boost.Asio
- gsoap - C/C++ development toolkit for XML data bindings, fast WSDL/SOAP/XML Web services, WS-Security, JSON/XML-RPC RESTful services
- POCO - networking: encryption, HTTP; Zip files
- omniORB - the fastest, complete and portable CORBA ORB implementation in C++
- ACE - asynchronous networking, event demultiplexing, messaging
- TAO - CORBA
- wvstreams
- Unicomm - asynchronous networking, high-level TCP communication framework
- restful_mapper - ORM for consuming RESTful JSON APIs in C++
- zeromq - fast message queue
- curlpp - C++ wrapper for CURL library
- Apache Thrift - The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
- libashttp - asynchronous HTTP client library
- Simple C++ REST library - Very simple and self documenting library for creating a REST API in your c++ application
- libtins - Network packet crafting and sniffing library
- PcapPlusPlus - Multiplatform C++ network sniffing and packet parsing and crafting framework
- HTTPP - Simple, production ready HTTP server built on top of Boost and a client built on top of libcurl. (BSD)
- The Silicon C++14 Web Framework - Fast and Robust Web APIs (MIT).
- ngrest - Fast and easy in use JSON RESTful Web Services Framework (Apache2).
- restc-cpp - Takes the pain out of accessing JSON API's from C++. HTTP Client, native C++ class to/from JSON serialization, asynchronous IO trough boost::asio coroutines. C++14. (MIT)
- OpenDDS - DDS implementation
- Breep - Event based, high-level, peer-to-peer library, allowing users to directly send and receive objects.
- uvw - libuv wrapper in modern C++
- rest_rpc - modern, simple, easy to use rpc framework
- EasyHttp - A cross-platform HTTP client library with a focus on usability and speed, supporting http response caching and more. (MIT License)
- nghttp2 - HTTP/2 C Library and tools (server, client, proxy and benchmarking tools) (MIT License)
[edit] Graphic user interface
- Dear ImGui - A bloat-free graphical user interface library that is highly optimized.
- FLTK
- nana[doc] - GUI programming in modern C++ style (Boost License)
- WxWidgets[src][doc]
- OWLNext - Modern update to OWL for writing GUI applications in standard C++ on Windows
- tiny file dialogs - a single C C++ cross-platform file (no init, no main loop, 6 modal function calls)
- Switch - The Switch.Windows.Forms library contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, maxOS X and Linux.
- GTK+
- Qt
- Qt[src][doc]
- qwtplot3d
- qwt5 - Qt Widgets for Technical Applications
- libdbusmenu-qt
- QuickQanava - C++14 library for drawing directed graphs in a Qt/QML application; project homepage: http://www.qanava.org
- QuickProperties - C++/QML library for QObject/QtObject properties edition; project homepage: http://www.qanava.org
[edit] General Multimedia
- SFML (Simple and Fast Multimedia Library)
- SDL (Simple DirectMedia Layer) - cross-platform, low level access to audio, keyboard, mouse, joystick, and graphics hardware via that platform's graphics API (usually OpenGL or Direct3D) (zlib license)
- SIGIL (Sound, Input, and Graphics Integration Library) - mind-bogglingly simple, cross-platform, minimalist library for text, shapes, input, audio, and 2D images
- Cinder
- openFrameworks
[edit] Graphics
- cairomm
- nux
- pangomm
- gegl
- stb
- Adobe/boost GIL - high-level generic library, focused on algorithms that operate on 2D images. Very limited I/O options.
- GraphicsMagick - Reading, writing, and manipulating images in over 88 major formats. Forked from ImageMagick in 2002
- Skia Graphics Engine - Google's core graphics library as of 2005, used in Chrome, Chrome OS, Android, and also in Firefox and Sublime Text enwiki:Skia_Graphics_Engine
- Anti-Grain Evolution - cross-platform 2D rasterization and rendering engine
- Plotting
- Formats
[edit] Audio
- soundtouch
- KFR - Fast, modern DSP framework, DFT/FFT, Audio resampling, FIR/IIR filters, Biquad
- Aquila - cross-platform DSP library
- Fingerprinting
- Formats
- Tagging
- CD
[edit] Image Processing
[edit] Video
[edit] 3D Graphics
- Vulkan
- OpenGL
- bgfx Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
- Ogre3D
- Diligent Engine A modern cross-platform low-level 3D graphics library.
- GLEW OpenGL function loading
- GLAD Customizable, lightweight library for loading OpenGL functions
- Epoxy Modern successor to GLEW. Abstracts difference between some kinds of GL contexts, which makes it sometimes simpler to use than GLEW. Used by GTK+ project since 2015.
- GLFW OpenGL window manager
- GLM Header only C++ mathematics library for rendering
- hlsl++ Header only C++ math library for rendering using hlsl syntax. Supports SSE and NEON
- assimp 3D model loading
- VTK
- Magnum Lightweight and modular C++11/C++14 graphics middleware for games and data visualization
- Irrlicht
- Horde3D
- Visionaray A C++ ray tracing template library
- Open CASCADE SDK for 3D CAD/CAM/CAE applications
- OpenSceneGraph
[edit] Game Engine Architecture
- EntityX
- Anax
- EntityPlus
- EnTT
- BOX2D Physics engine
[edit] Internationalization
- IBM ICU
- gettext
- spirit-po - A small, header-only library which parses po-files and provides an interface similar to GNU libintl. Based on boost::spirit.
[edit] Math
- stats++ - Advanced, comprehensive statistical software: data collection and preprocessing, statistics, machine learning, and optimization, with open C++ source code.
- StatsLib - A templated, header-only library of statistical distribution functions.
- alglib
- ArrayFire High Performance Computation Library
- GNU MP bignum C++ interface
- BigNumber - C++ class for creating and computing arbitrary-length integers
- Boost.Multiprecision
- Boost.Math.Special Functions and Statistical Distributions
- Boost.Random
- NTL - A Library for doing Number Theory
- cpp-measures - A header-only C++11 library to handle physical measures
- G+Smo cross-platform library for isogeometric analysis
- Exact floating-point arithmetic library
- Linear algebra
- Boost.uBLAS
- Eigen
- Armadillo
- Blitz++
- IT++
- Dlib - linear algebra tools
- Blaze
- ETL
- DecompLib - A header-only C++11 library to decompose a vector into a set of positive definite weighted basis vectors.
- Optimization
- OptimLib - A C++11 library of numerical optimization methods for nonlinear functions.
- Graph theory
- Boost.Graph
- LEMON
- OGDF - Open Graph Drawing Framework
- NGraph - a simple (Network) Graph library in C++
- GTpo - C++14 generic graph topology library with Protocol Buffer serialization; project homepage: http://www.qanava.org
- Class Library for Numbers
- Machine Learning
- stats++
- liblinear
- Dlib - machine learning tools
- MLPACK - machine learning package
- Shogun - large scale machine learning toolbox
- Computational geometry
- CGAL - Computational geometry algorithms library
- Wykobi - Computational geometry library
- PCL - Point Cloud library
- Automata theory
[edit] Financial Calculations
[edit] Concurrency
- Intel TBB
- OpenMP
- Cpp-Taskflow Fast C++ Parallel Programming with Task Dependencies
- RaftLib C++ stream like concurrent actors
- Thrust STL-like algorithms and data-structures for CUDA
- ViennaCL Linear algebra and algorithms with OpenMP, CUDA, and OpenCL backends
- VexCL C++ expression templates library for OpenCL and CUDA
- Boost.Compute (unofficial) STL-like algorithms and data-structures for OpenCL
- Boost.Interprocess
- Boost.Thread
- Boost.Atomic
- Boost.Lockfree
- Boost.MPI
- Boost.Context
- libopenmpi
- libsimdpp
- HPX A general purpose C++ runtime system for parallel and distributed applications of any scale
- KOKKOS A programming model in C++ for writing performance portable HPC applications
- SObjectizer A small framework for simplification of development of concurrent and event-driven applications in C++ by using actor and publish-subscribe models.
- BlockingCollection A C++11 thread safe collection class modeled after .NET BlockingCollection.
[edit] Containers
- Boost.Any
- Boost.Array
- Boost.Bimap
- Boost.Container
- Boost.Fusion
- Boost.Heap
- Boost.Pointer Container
- Boost.Tuple
- Boost.Variant
- cpp-btree - btree_map, btree_set, btree_multimap, btree_multiset.
- TdhLists
- strict_variant - A fast, never-empty variant targetting C++11. Prevents many undesirable implicit conversions.
- eggs::variant - Eggs.Variant is a C++11/14 generic, type-safe, discriminated union. It is notable in particular for having very good `constexpr` support.
- Ygg - An intrusive C++11 implementation of high-performance containers and data structures such as a Red-Black-Tree, an Interval Tree and an Interval Map.
- plf::list - std::list implementation which sacrifices range-splicing for cache-friendliness, yielding faster insertion, erasure and iteration.
- plf::stack - Drop-in replacement container for the std::stack container adaptor with better performance than std::vector and std::deque in a stack context.
- plf::colony - Unordered "bag-like" container which outperforms std:: containers in high-modification scenarios while maintaining valid pointers to non-erased elements regardless of insertion and erasure.
- ring_span - A simplified implementation of Arthur O'Dwyer's ring_span - ie. a circular buffer view.
[edit] Metaprogramming
- Boost.MPL - Original metaprogramming library, targeted at C++03, slow
- Boost.Hana - New metaprogramming library for both types and values
- Boost.Mp11
- Boost.CallableTraits
- Metal - Uses lazy metafunctions (like MPL), 100% SFINAE-friendly, optimized for SLOC
- Brigand - Uses eager metafunctions, optimized for best performance
- Meta - Uses eager metafunctions, middle ground between metal and brigand wrt performance
- Boost.Metaparse - Compile-time parser library, producing types, values, and metafunctions from compile-time strings
- Boost.Proto - A library for building expression template-backed EDSLs
- CoMeta - Lightweight, header-only C++14 metaprogramming library
- visit_struct - A miniature reflection library, providing structure visitors for C++11. Self-contained, 100-200 lines of code depending how you count.
[edit] Serialization
- Boost.Serialization
- libs11n
- sweet_persist
- protobuf
- gSOAP - accurate XML serialization
- C++ XML objects
- yaml-cpp
- YAS (Yet Another Serialization)
- cereal (C++11 serialization)
- jios (JSON serialization)
- ThorsSerializer (JSON/YAML Input Output Streams)
- iguana (universal serialization engine)
- cppcodec - Header-only C++11 library to encode/decode base64, base32 and hex with consistent, flexible API (MIT License)
- rpnx-serial A library that can (de)serialize types like std::map, std::vector, etc.
[edit] Testing
- Boost.Test
- cppunit
- Google Test
- Catch2
- doctest - The lightest feature-rich C++ single-header testing framework for unit tests and TDD
- liblittletest - Portable, one file header-only testing framework
- ELFspy - Testing in isolation with fakes and spies - Linux only
[edit] Benchmarking
- Celero
- gperftools - 'Google Performance Tools' includes a high-performance, multi-threaded malloc implementation plus tools for benchmarking heap allocation and CPU utilization.
- plf::nanotimer - Lowest-overhead, cross-platform simple timer class for benchmarking.
[edit] XML
- libxml++
- pugixml
- tinyxml
- tinyxml2 - Another and work in progress of TinyXML.
- Xerces
- gSOAP - XML data bindings
- ai-xml - Serialize objects to and from XML by adding a single, minimal, function to a class. Uses libxml++ under the hood.
[edit] JSON
- json - JSON for Modern C++
- ArduinoJson - ArduinoJson
- jsonme--
- ThorsSerializer (JSON/YAML Input Output Streams)
- JsonBox
- jsoncpp
- zoolib
- JOST
- CAJUN
- libjson
- nosjob
- rapidjson
- jsoncons - jsoncons is a C++ library for the construction of tree structured json values. It also supports an event-based streaming API.
- JSON++
- qjson
- json-cpp
- jansson - Jansson is C library for encoding, decoding and manipulating JSON data.
- json11 - json11 is a tiny JSON library for C++11, providing JSON parsing and serialization.
- JSON Voorhees - Killer JSON for C++
- jeayeson - A very sane (header only) C++14 JSON library
- ujson - µjson is a small, C++11, UTF-8, JSON library
- minijson - C++ DOM-less and allocation-free JSON parsing and serialization
- jios (JSON Input Output Streams)
[edit] Web
- libmusicbrainz5
- liblastfm
- libkcddb
- Chromium Embedded
- QtWebApp HTTP(s) Server in C++ inspired by Java Servlets
- Wt[src][doc]
- Tufão
- libhttpserver
- cpp-jwt
- oatpp Light, zero-dependency framework to create high-performance web-services.
[edit] GPS
[edit] Databases
- OTL
- DTL
- libpqxx
- lmdb++ - C++11 wrapper for the LMDB embedded B+ tree database library.
- mongocxx - C++11 driver library for MongoDB
- mysql++
- ODB - C++ Object-Relational Mapping (ORM)
- Pgfe - PostGres FrontEnd - The modern C++ client API to PostgreSQL
- QUINCE: QUeries IN C++ Expressions (ORM+EDSL)
- QxOrm - C++ Qt Object-Relational Mapping (ORM)
- SOCI
- sqlpp11
[edit] Cryptography
[edit] File metadata
[edit] Text
- Parse
- PEGTL - Parsing Expression Grammar Template Library
- Search
- Template Engine
- inja - A Template Engine for Modern C++
[edit] Terminal
- cwidget
- replxx - A readline and libedit replacement that supports UTF-8, syntax highlighting & hints.
[edit] Configuration
- gconfmm
- libconfig
- libconfini - INI parser
- Boost.Program_options
[edit] Embedded languages bindings
- ChaiScript
- ExprTk
- lua
- AngelScript - a scripting language like C++.
- mozjs
- muparser
- PythonQt
- ScriptCaller - a header only library allowing us to call ruby scripts.
[edit] Embedded/realtime
- QP/C++ - RTOS kernel, dual GPL
- FreeRTOS C++ Handler - handler, looper, state machine, CLI, portable
- ETL - Embedded Template Library - C++ 03, Portable template library tailored for low resource platforms
- distortos - object-oriented C++ RTOS for microcontrollers
- µcuREST - C++11 REST/JSON server framework for microcontrollers
[edit] PDF
[edit] Logging
- Log4cpp - A library of C++ classes for flexible logging to files, syslog, IDSA and other destinations (LGPL)
- spdlog - Super fast, header only, C++ logging library
- plog - Portable and simple log for C++ in less than 1000 lines of code (MPL2)
- Boost.Log
- glog - Google Logging Library
- log4cxx - Apache log4cxx is a logging framework for C++ patterned after Apache log4j
- Pantheios - Diagnostic Logging API library, offering a combination of type-safety, efficiency, genericity and extensibility
[edit] Sorting
- Timsort - Templated stable sorting function which outperforms quicksort-based algorithms including std::sort, for reversed or semi-sorted data. (MIT)
[edit] See also
C documentation for Non-ANSI/ISO Libraries
|