Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Library

 

A library is a collection of functions and classes.

 

There are multiple types of libraries that can be built:

 

The C++ standard library is called the Standard Template Library. The playground of the next version of the STL is the Boost library collection..

 

libraries can be catagorized by their way of using them in a project:

 

The STL is header-only. Most Boost libraries are header-only.

 

An easy-to-install library from an online repository is called a package.

 

 

 

 

 

 

Advice

 

 

 

 

 

 

Overview of C++ libraries (incomplete)

 

In practice, these are the libraries I use or have used, on the platforms indicated by the pictograms.

 

 

  1. FAILWindowsTODO  ALGLIB: scientific computation
  2. N/A    Annie: neural networks
  3. OKAYWindows   apfloat: arbitrary precision numbers
  4. OKAYBigIntLubuntuUbuntuWindows BigInt: near-infinite size integer
  5. FAILWindowsTODO  Blitz++: scientific computation
  6. OKAYBoostLubuntuUbuntuWindows Boost: many libraries, next STL
  7. TODOBoostLubuntu  Boost.Accumulators: incremental calculation, statistical accumulators [4]
  8. TODOBoostLubuntuWindows Boost.Algorithm: algorithms [4]
  9. OKBoostLubuntu  Boost.Any: Safe, generic container for single values of different value types [4]
  10. OKBoostLubuntu  Boost.Array: STL compliant container wrapper for arrays of constant size [4]
  11. OKAYBoostLubuntuUbuntu Boost.Asio: Portable networking [4]
  12. TODOBoostLubuntu  Boost.Assign: Filling containers [4]
  13. TODOBoostLubuntu  Boost.Atomic: C++11-style atomic<> [4]
  14. OKAYBoostLubuntuWindows Boost.Bimap: Bidirectional maps [4]
  15. OKAYBoostLubuntuWindows Boost.Bind: binders
  16. TODOBoostLubuntu  Boost.Call Traits: Defines types for passing parameters [4]
  17. TODOBoostLubuntu  Boost.Chrono: time utilities [4]
  18. TODOBoostLubuntu  Boost.Circular Buffer: Circular/ring/cyclic buffer [4]
  19. TODOBoostLubuntu  Boost.Compatibility: Help for non-conforming standard libraries [4]
  20. TODOBoostLubuntu  Boost.Compressed Pair: Empty member optimization [4]
  21. TODOBoostLubuntu  Boost.ConceptCheck: Tools for generic programming [4]
  22. TODOBoostLubuntu  Boost.Container: Standard library containers and extensions [4]
  23. TODOBoostLubuntu  Boost.Context: Context switching library [4]
  24. OKAYBoostLubuntuUbuntu Boost.Conversion: Polymorphic and lexical casts [4]
  25. TODOBoostLubuntu  Boost.Coroutine: Coroutine library [4]
  26. TODOBoostLubuntu  Boost.CRC: Cyclic Redundancy Code [4]
  27. OKAYBoostLubuntuUbuntu Boost.Date_Time: date and time [4]
  28. TODOBoostLubuntu  Boost.Dynamic_bitset: dynamic_bitset [4]
  29. TODOBoostLubuntu  Boost.Enable_if: Selective inclusion of function template overloads [4]
  30. TODOBoostLubuntu  Boost.Exception: The Boost Exception library [4]
  31. OKAY?BoostLubuntuUbuntuWindows Boost.Filesystem: The Boost Filesystem Library [4]
  32. TODOBoostLubuntu  Boost.Flyweight: Flyweight Design Pattern [4]
  33. OKAYBoostLubuntuUbuntuWindows Boost.Foreach: BOOST_FOREACH [4]
  34. TODOBoostLubuntu  Boost.Format: text formatting [4]
  35. OKAYBoostLubuntu  Boost.Function: callbacks [4]
  36. TODOBoostLubuntu  Boost.FunctionTypes: function to member types [4]
  37. OKAYBoostLubuntu  Boost.Functional: function object wrappers [4]
  38. TODOBoostLubuntu  Boost.Functional/Factory: dynamic and static object creation [4]
  39. TODOBoostLubuntu  Boost.Functional/Forward: allow generic function objects to accept arbitrary arguments [4]
  40. TODOBoostLubuntu  Boost.Functional/Hash: A TR1 hash function object [4]
  41. TODOBoostLubuntu  Boost.Functional/Overloaded Function: Overload different functions into a single function object [4]
  42. TODOBoostLubuntu  Boost.Fusion: Library for working with tuples, including various containers, algorithms, etc. [4]
  43. OKAYBoostLubuntuWindows Boost.Geometry: Geometry Library [4]
  44. TODOBoostLubuntu  Boost.GIL: Generic Image Library [4]
  45. OKAYBoostLubuntuUbuntuWindows Boost.Graph: Graph [4]
  46. TODOBoostLubuntu  Boost.Heap: Priority queue data structures [4]
  47. TODOBoostLubuntu  Boost.ICL: Interval Container Library [4]
  48. TODOBoostLubuntu  Boost.Identity Type: Wrap types within round parenthesis so they can always be passed as macro parameters [4]
  49. TODOBoostLubuntu  Boost.In Place Factory, Typed In Place Factory: Generic in-place construction of contained objects with a variadic argument-list [4]
  50. OKAYBoostUbuntu  Boost.Integer: Access standard integer types without placing any names in namespace std [4]
  51. TODOBoostLubuntu  Boost.Interprocess: Shared memory, memory mapped files, process-shared mutexes, condition variables, containers and allocators [4]
  52. TODOBoostLubuntu  Boost.Interval: Extends the usual arithmetic functions to mathematical intervals [4]
  53. TODOBoostLubuntu  Boost.Intrusive: Intrusive containers and algorithms [4]
  54. TODOBoostLubuntu  Boost.IO State Savers: I/O library [4]
  55. TODOBoostLubuntu  Boost.Iostreams: Framework for defining streams [4]
  56. TODOBoostLubuntu  Boost.Iterator: Iterator [4]
  57. OKAYBoostLubuntuUbuntuWindows Boost.Lambda: Lambda functions
  58. OKAYBoostLubuntuUbuntuWindows Boost.Lexical Cast: text conversions [4]
  59. TODOBoostLubuntu  Boost.Local Function: Program functions locally, within other functions, directly within the scope where they are needed [4]
  60. TODOBoostLubuntu  Boost.Locale: Provide localization and Unicode handling tools for C++ [4]
  61. TODOBoostLubuntu  Boost.Lockfree: Lockfree data structures [4]
  62. OKAYBoostLubuntuWindows Boost.Math: Math [4]
  63. TODOBoostLubuntu  Boost.Math Common Factor: Greatest common divisor and least common multiple [4]
  64. TODOBoostLubuntu  Math Octonion: Octonions [4]
  65. TODOBoostLubuntu  Boost.Math Quaternion: Quaternions [4]
  66. TODOBoostLubuntu  Boost.Math/Special Functions: Mathematical special functions [4]
  67. TODOBoostLubuntu  Boost.Math/Statistical Distributions: Statisticals
  68. TODOBoostLubuntu  Boost.Member Function: Generalized binders for function/object/pointers and member functions [4]
  69. TODOBoostLubuntu  Boost.Meta State Machine: A very high-performance library for expressive UML2 finite state machines [4]
  70. TODOBoostLubuntu  Boost.Min-Max: Standard library extensions for simultaneous min/max and min/max element computations [4]
  71. TODOBoostLubuntu  Boost.Move: Portable move semantics for C++03 and C++11 compilers [4]
  72. TODOBoostLubuntu  Boost.MPI: Message Passing Interface library, for use in distributed-memory parallel application programming [4]
  73. TODOBoostLubuntu  Boost.MPL: Compile-time Metaprogramming Library
  74. TODOBoostLubuntuWindows Boost.Multi-Array: N-dimensional array [4]
  75. TODOBoostLubuntu  Boost.Multi-Index: container maintaining one or more indices with different sorting and access semantics [4]
  76. TODOBoostLubuntu  Boost.Multiprecision: Extended precision arithmetic types for floating point, integer andrational arithmetic [4]
  77. OKAYBoostLubuntu  Boost.Numeric Conversion: Optimized Policy-based Numeric Conversions [4]
  78. TODOBoostLubuntu  Boost.Odeint: Solving ordinary differential equations [4]
  79. TODOBoostLubuntu  Boost.Operators: Templates ease arithmetic classes and iterators [4]
  80. TODOBoostLubuntu  Boost.Optional: Discriminated-union wrapper for optional values [4]
  81. TODOBoostLubuntu  Boost.Parameter: Boost.Parameter Library - Write functions that accept arguments by name [4]
  82. TODOBoostLubuntu  Boost.Phoenix: Define small unnamed function objects at the actual call site, and more [4]
  83. TODOBoostLubuntu  Boost.Pointer Container: Containers for storing heap-allocated polymorphic objects [4]
  84. TODOBoostLubuntu  Boost.Polygon: Booleans/clipping, resizing/offsetting and more for planar polygons with integral coordinates [4]
  85. TODOBoostLubuntu  Boost.Pool: Memory pool management [4]
  86. TODOBoostLubuntu  Boost.Preprocessor: Preprocessor metaprogramming tools including repetition and recursion [4]
  87. OKAY?BoostLubuntuUbuntuWindows Boost.Program_options: parse program options
  88. TODOBoostLubuntu  Boost.Property Map: Concepts defining interfaces which map key objects to value objects [4]
  89. OKAYBoostLubuntu  Boost.PropertyTree: saving data to XML file, parsing XML files
  90. TODOBoostLubuntu  Boost.Proto: Expression template library and compiler construction toolkit [4]
  91. TODOBoostLubuntu  Boost.Python: interfacing Python and C++ [4]
  92. OKAYBoostLubuntu  Boost.Random: A complete system for random number generation [4]
  93. TODOBoostLubuntu  Boost.Range: generic algorithms that builds on top of the new iterator concepts [4]
  94. TODOBoostLubuntu  Boost.Ratio: Compile time rational arithmetic [4]
  95. TODOBoostLubuntu  Boost.Rational: A rational number class [4]
  96. TODOBoostLubuntu  Boost.Ref: A utility library for passing references to generic functions [4]
  97. OKAY?BoostLubuntuUbuntuWindows Boost.Regex: Regular expression library [4]
  98. TODOBoostLubuntu  Boost.Result Of: Determines the type of a function call expression [4]
  99. TODOBoostLubuntu  Boost.Scope Exit: Execute arbitrary code at scope exit [4]
  100. TODOBoostLubuntu  Boost.Serialization: Serialization for persistence and marshalling [4]
  101. TODOBoostLubuntu  Boost.Signals: Managed signals < slots callback implementation [4]
  102. OKAYBoostLubuntuUbuntuWindows Boost.Signals2: Managed signals < slots callback implementation (thread-safe version 2) [4]
  103. OKAYBoostLubuntuUbuntuWindows Boost.Smart_ptr: smart pointers
  104. TODOBoostLubuntu  Boost.Spirit: LL parser framework represents parsers directly as EBNF grammars in inlined C++ [4]
  105. OKAYBoostUbuntu  Boost.Statechart: finite state machines
  106. OKAYBoostLubuntu  Boost.Static Assert: Static assertions (compile time assertions) [4]
  107. OKAYBoostLubuntu  Boost.String Algo: String algorithms library [4]
  108. TODOBoostLubuntu  Boost.Swap: Enhanced generic swap function [4]
  109. OK?BoostLubuntuWindows Boost.System: Operating system support [4]
  110. OKAYBoostLubuntu  Boost.Test: Support for simple program testing, full unit testing, and for program execution monitoring [4]
  111. TODOBoostLubuntu  Boost.Thread: Portable C++ multi-threading [4]
  112. OKAYBoostLubuntu  Boost.Timer: Event timer, progress timer, and progress display classes [4]
  113. TODOBoostLubuntu  Boost.Tokenizer: Break of a string or other character sequence into a series of tokens [4]
  114. TODOBoostLubuntu  Boost.TR1: TR1 library
  115. OKAYBoostLubuntu  Boost.Tribool: 3-state boolean type library [4]
  116. OKAYBoostLubuntu  Boost.Tuple: Tuple
  117. TODOBoostLubuntu  Boost.Type Traits: Templates for fundamental properties of types [4]
  118. TODOBoostLubuntu  Boost.Typeof: Typeof operator emulation [4]
  119. OKAYBoostLubuntuWindows Boost.uBLAS: Matrices [4]
  120. OKAYBoostLubuntuWindows Boost.Units: Zero-overhead dimensional analysis and unit/quantity manipulation and conversion [4]
  121. TODOBoostLubuntu  Boost.Unordered: Unordered associative containers [4]
  122. TODOBoostLubuntu  Boost.Utility: noncopyable, checked_delete(), checked_array_delete(), next(), prior() function templates, plus base-from-member idiom [4]
  123. TODOBoostLubuntu  Boost.Uuid: A universally unique identifier [4]
  124. TODOBoostLubuntu  Boost.Value Initialized: Wrapper for uniform-syntax value initialization [4]
  125. TODOBoostLubuntu  Boost.Variant: Safe, generic, stack-based discriminated union container [4]
  126. TODOBoostLubuntu  Boost.Wave: C++ implementation of the mandated C99/C++ preprocessor functionality [4]
  127. TODOBoostLubuntuWindows Boost.Xpressive: Regular expressions allowing context-free grammars [4]
  128. TODOQt CreatorWindows  Box2D: 2D physics engine
  129. FAILQt CreatorWindows  Bullet: 3D physics engine
  130. ?OKAYCLNUbuntu  CLN: arbitrary precision numbers
  131. ?OKAYWindows   CLX: GUI
  132. N/A    Eo: genetic algorithms
  133. ?OKAYUbuntu   FANN: neural networks
  134. ?OKAYUbuntu   Flood: neural networks
  135. ?OKAYUbuntu   GAlib: genetic algorithms
  136. FAILWindowsTODO  GMP: multi-precision numbers
  137. OKAYWindows   GMTL: scientific computation
  138. FAILWindowsTODO  GSL: GNU scientific library
  139. OKAYWindows   HFLOAT: arbitrary precision numbers
  140. OKAYLubuntu   Irrlicht: 3D engine
  141. ?OKAYlibndsNDS  libnds: working with NDS
  142. OKAYUbuntu   MathGL: visualizing data
  143. OKAYLubuntu   NAG: algorithms
  144. FAIL    ODE: Open Dynamics Engine, 3D physics engine
  145. OKAY    OGRE: 3D engine
  146. FAILWindows   OpenCL: communication with CPU's, GPU's and other processors
  147. OKAYWindows   OpenCV: computer vision
  148. ?OKAYUbuntuWindows  OpenGL: 2D and 3D graphics
  149. TODO    Open Inventor: 3D graphics
  150. TODO    OpenSceneGraph: 3D graphics
  151. TODO    Panda3D: 3D graphics
  152. OKAYUbuntu   Poppler: render PDFs
  153. N/AQuantLib   QuantLib: quantitative finance
  154. OKAYLubuntuWindows  Triangle: two-dimensional mesh generator and Delaunay triangulator
  155. OKAYQtLubuntuUbuntuWindows QT: GUI
  156. OKAYLubuntuUbuntuWindows Qwt: visualizing data in 2D charts/plots
  157. N/AUbuntu   QwtPlot3D: visualizing data in 3D charts/plots
  158. OKAYUbuntu   SDL: multimedia
  159. OKAYLubuntu   SFML: 2D graphics
  160. ?OKAYUbuntu   Shark: machine learning
  161. OKAYSTLLubuntuUbuntuWindows STL: general purposes
  162. OKAYUbuntu   STK: audio
  163. OKAYLubuntu   Urho3D: 3D graphics
  164. ?OKAYVCLWindows  VCL: GUI
  165. TODO    Visualization Library : 3D graphics
  166. OKAYWtLubuntuUbuntu Wt: dynamic websites

 

 

 

 

 

References

 

  1. Scott Meyers. Effective C++ (3rd edition). ISBN: 0-321-33487-6. Item 53: Familiarize yourself with the standard library, including TR1
  2. Scott Meyers. Effective C++ (3rd edition). ISBN: 0-321-33487-6. Item 54: Familiarize yourself with Boost
  3. Bjarne Stroustrup. Programming. 2009. ISBN: 978-0-321-54372-1. Chapter 5.9.1: 'Use library facilities rather than your own code when you can'
  4. Boost documentation
  5. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Page 32, 1.5 'Advice', item 12: 'Use libraries, especially the standard library, rather than trying to build everything from scratch'
  6. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 13.7. Advice. page 387: '[34] A library shouldn't unilaterally terminate a program. Instead, throw an exception and let a caller decide'
  7. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 13.7. Advice. page 387: '[35] A library shouldn't produce diagnostic output aimed at an end user. Instead, throw an exception and let a caller decide'
  8. Bjarne Stroustrup. A tour of C++. 2014. ISBN: 978-0-321-958310. Chapter 11.7.2, page 131: 'A library doesn't have to be large or complicated to be useful'

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict