What Modern C++ Libraries Should Be in My Toolbox

What modern C++ libraries should be in my toolbox?

Cross-platform libraries that are free for commercial (or non-commercial) applications

Feel free to expand this list



  • General Purpose
    • Boost
    • Loki
    • MiLi
    • POCO
    • STL (of course)
    • STXXL (STL re-implementation for extra large data sets)
    • Qt
    • ASL
    • JUCE


  • Audio
    • FMOD
    • Synthesis ToolKit
  • Database
    • SOCI
    • OTL
    • LMDB++
  • Design
    • IoC Frameworks
      • Hypodermic
      • PocoCapsule
      • Wallaroo
  • Documents
    • LibreOffice API
    • PoDoFo
  • Graphics
    • Allegro
    • OGRE
    • SFML
  • GUI
    • FLTK
    • GTK
    • Qt
    • Qwt
    • wxWidgets
    • VTK
  • Hashing
    • MurmurHash3
  • Imaging
    • Boost.GIL
    • CImg
    • DevIL
    • EasyBMP
    • FreeImage
    • ITK
    • OpenCV
  • Logging
    • Boost.Log
    • log4cxx
    • Pantheios
  • Mocking
    • Google Mock
    • Hippo Mocks
    • Turtle (C++ mock object library for Boost)
  • Multimedia
    • openframework
    • Cinder
    • SDL
  • Networking
    • ACE
    • Boost.Asio
    • ICE
  • Testing
    • Boost.Test
    • Google Test
    • UnitTest++
    • doctest
  • Threading
    • Boost.Thread
  • Version Control
    • libgit2
  • Web Application Framework
    • CppCMS
    • Wt
  • XML
    • Libxml2
    • pugixml
    • RapidXml
    • TinyXML
    • Xerces-C++

Links to additional lists of open source C++ libraries:

http://en.cppreference.com/w/cpp/links/libs

Re-learn modern C++ resources?

Get to know the S.tandard T.emplate L.ibrary.

Get to know boost, if you are really on the cutting edge.

Read the books "effective c++", and "effective STL" by scott meyers.

Read the "C++ faq lite".

(not necsissarily in that order)

How to properly install SOCI c++ library on windows 10?

Apparently this issue is not just with SOCI. While searching for solution, I came across a lot of other libraries who are having the same issue with VS17. https://github.com/robotology/icub-firmware-shared/issues/25 https://forum.juce.com/t/solved-error-with-vs2015-regarding-snprintf/14831 to link a few.
Seems like after some version the 'snprintf' was added to VS (Standard Library). So its conflicting with the macros of all the libraries who use it.

The only way to get around it is to either change the name of the macro manually (like shown in the video) or edit the macro definitions (which I did and prefer cos its far cleaner) as follows :

#define snprintf _snprintf

to:

#if _MSC_VER < 1900
#define snprintf _snprintf
#endif

This got rid of all my errors and the solution build succesfuly without any errors.
I don't know why the people maintaining haven't make changes to the library itself to avoid this . I hope to get in touch with them and ask them to do the same.

Hope this helps everyone who is having similar issues with any library.

MFC toolbox control

BCGSoft has this component:
http://www.bcgsoft.com/featuretour/tour168.htm

What are the most widely used C++ vector/matrix math/linear algebra libraries, and their cost and benefit tradeoffs?

There are quite a few projects that have settled on the Generic Graphics Toolkit for this. The GMTL in there is nice - it's quite small, very functional, and been used widely enough to be very reliable. OpenSG, VRJuggler, and other projects have all switched to using this instead of their own hand-rolled vertor/matrix math.

I've found it quite nice - it does everything via templates, so it's very flexible, and very fast.


Edit:

After the comments discussion, and edits, I thought I'd throw out some more information about the benefits and downsides to specific implementations, and why you might choose one over the other, given your situation.

GMTL -

Benefits: Simple API, specifically designed for graphics engines. Includes many primitive types geared towards rendering (such as planes, AABB, quatenrions with multiple interpolation, etc) that aren't in any other packages. Very low memory overhead, quite fast, easy to use.

Downsides: API is very focused specifically on rendering and graphics. Doesn't include general purpose (NxM) matrices, matrix decomposition and solving, etc, since these are outside the realm of traditional graphics/geometry applications.

Eigen -

Benefits: Clean API, fairly easy to use. Includes a Geometry module with quaternions and geometric transforms. Low memory overhead. Full, highly performant solving of large NxN matrices and other general purpose mathematical routines.

Downsides: May be a bit larger scope than you are wanting (?). Fewer geometric/rendering specific routines when compared to GMTL (ie: Euler angle definitions, etc).

IMSL -

Benefits: Very complete numeric library. Very, very fast (supposedly the fastest solver). By far the largest, most complete mathematical API. Commercially supported, mature, and stable.

Downsides: Cost - not inexpensive. Very few geometric/rendering specific methods, so you'll need to roll your own on top of their linear algebra classes.

NT2 -

Benefits: Provides syntax that is more familiar if you're used to MATLAB. Provides full decomposition and solving for large matrices, etc.

Downsides: Mathematical, not rendering focused. Probably not as performant as Eigen.

LAPACK -

Benefits: Very stable, proven algorithms. Been around for a long time. Complete matrix solving, etc. Many options for obscure mathematics.

Downsides: Not as highly performant in some cases. Ported from Fortran, with odd API for usage.

Personally, for me, it comes down to a single question - how are you planning to use this. If you're focus is just on rendering and graphics, I like Generic Graphics Toolkit, since it performs well, and supports many useful rendering operations out of the box without having to implement your own. If you need general purpose matrix solving (ie: SVD or LU decomposition of large matrices), I'd go with Eigen, since it handles that, provides some geometric operations, and is very performant with large matrix solutions. You may need to write more of your own graphics/geometric operations (on top of their matrices/vectors), but that's not horrible.

C++ Builder or Visual Studio for native C++ development?

Coming from Delphi, you'll find the VCL straightforward to use with C++ Builder. There are a few oddities, like C++ doesn't hide the fact that TObjects are all really pointers (which Delphi hides from you), and some things like array properties are accessed differently.

Two or three years back, I was looking for any way out of C++Builder, but now, with recent releases (and Embarcadero's purchase of Codegear), I'm happy with the product and the direction.

You'll find the number of string types and the assorted potential incompatibilities quite painful with C++Builder, but you'll get used to it! (std::string, char[], wchar_t[], TCHAR, AnsiString, WideString, UnicodeString and String to name a few)

Personally I'd vote for C++ Builder - because of two-way RAD and the VCL, although it may not be the best way of learning modern C++ idioms.



Related Topics



Leave a reply



Submit