45

I'm looking for a few new libraries and for C and C++. In the past most of the time I "accidently" stumbled across a few - and most of them found good use in projects I worked on.

Libraries should run on Mac OS X and Linux/POSIX and possibly on Windows.

  • Lua - A minimal and fast scripting engine for configuration files and basic application scripting.
  • V8 - A fast JavaScript by Google engine similar to WebKit's JavaScriptCore.
  • Cairo - A good graphcis library similar to QuickDraw/Quartz on Mac OS X.
  • ZBar - A barcode scanner library, which allows to scan photos/images/video streams for barcodes and return their value.
  • ZLib - A very compact compression library for data streams. Used zziblib and minizip, too.
  • DynaPDF - A easy-to-use PDF generation library.
  • libusb - A universal USB library which allows for portable access to USB devices (I used this to write a basic driver for a custom POS printer).
  • WebKit - This is a really nice one if you want to render HTML/Web contents and use it in applications to give your users a "richer" user experience.
  • Qt4 - The general purpose framework for all kinds of desktop (and possibly mobile) development. Spending a lot of my time with that - no idea how I could forget that. ;)

This should be marked community wiki. Please update if you have something interesting to add!

Thanks!


Update 1

I'm not looking for "productivity" libraries like Boost or STL. Instead I'm looking for "interesting new stuff" of random genres - be it graphics libraries, scripting libraries, network or even MOD/MIDI playing libraries. Sorry I didn't make that clear before.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
BastiBen
  • 19,679
  • 11
  • 56
  • 86
  • @bua: CW has been ___[dead](http://meta.stackexchange.com/questions/392/should-the-community-wiki-police-be-shut-down/7183#7183)___ for a long time now. – sbi Mar 10 '11 at 14:23
  • 2
    @badcat: Try to get into template meta programming. It will vastly expand your view onto what is possible in C++. – sbi Mar 10 '11 at 14:24
  • @Nawaz & @badcat: I kept pointing people at http://www.templog.org when they asked about logging libraries, but it seems the trunk isn't currently working very well and the guy who made it obviously doesn't to have time/energy/whatever to work on it anymore. IMO it's an excellent ___practical application___ of TMP (mainly expression templates) in a ___small, digestible library___ (mainly half a dozen headers). IOW, it's an ideal playground to tinker with. (A former co-worker of mine asked for SVN write access to add his own stuff and got it within hours.) – sbi Mar 10 '11 at 15:02

15 Answers15

22

STL and Boost are musts.

SQLite provides a completely embedded, full-featured relational database in a few 100k that you can include right into your project. It's also a highly marketable skill because of its high presence (it's included in Mozilla Firefox as well as Android and iOS).

If you're interested in creating user interfaces, look into ncurses -- it's the library that was used to create many terminal user interfaces and can be very useful for creating games and shell utilities. Qt is a good GUI framework for C++.

If you're interested in graphics or creating games, consider SDL or OpenGL (or DirectX if you don't mind only working on Windows).

Of course, there are thousands of interesting libraries. It really depends on what you're interested in.

Rafe Kettler
  • 75,757
  • 21
  • 156
  • 151
  • Qt is really a serious work. Maybe it is my personal opinion, but Qt is one of the most functional and complete GUI **framework** for C++. – ozgur Feb 02 '16 at 15:36
12

If you're into Image processing etc, then OpenCV might be interesting to have a play around with.

Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
8

Every C++ programmer should first play around with these two libraries:

  • C++ Standard Library - including STL Containers, STL Algorithm, STL Functional etc.
  • Boost C++ Libraries.

For GUI

Martin Thorsen Ranang
  • 2,394
  • 1
  • 28
  • 43
Nawaz
  • 353,942
  • 115
  • 666
  • 851
  • You probably meant Standard Template Library, aka STL? – Lundin Mar 10 '11 at 14:05
  • @Lundin: I mean C++ Standard Library that also include STL. See this [What's this STL vs. “C++ Standard Library” fight all about?](http://stackoverflow.com/questions/5205491/whats-this-stl-vs-c-standard-library-fight-all-about) – Nawaz Mar 10 '11 at 14:08
  • 1
    He probably didn't, the Standard Template Library is not the same as the Standard C++ Library, as only parts of it (like the containers and algorithms) have been incorporated into C++98 and the Standard (C++) Library contains much more. – filmor Mar 10 '11 at 14:11
  • 1
    My bad. Turns out I'm so old that I was around doing C++ before STL became part of the standard. Once upon a time STL was only a "de facto" standard, and thus people referred to it separately, like you do with Boost right now. Anyway, the OP is looking for something new, fresh and exciting, which probably rules out most of the C++ library... – Lundin Mar 10 '11 at 14:34
7

Why not try OGRE and peek into 3D graphics?

Alexander Gessler
  • 45,603
  • 7
  • 82
  • 122
5

Visualization Library could be of interest. Check out this Gallery

Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on the industry standard OpenGL 1.x-4.x, designed to develop portable applications for the Windows, Linux and Mac OS X operating systems.

Bullet Physics Library is an open source physics engine featuring 3D collision detection, soft body dynamics, and rigid body dynamics. It is used in games, and in visual effects in movies.

yolo
  • 2,757
  • 6
  • 36
  • 65
4

Boost seems an obvious choice.

But if you're looking for something a bit more specific then the OpenCV library seems to be generating a lot of interest at the moment - it's an open source computer vision library.

GrahamS
  • 9,980
  • 9
  • 49
  • 63
4

If you want to play around with machine learning (classifiers and that sort of thing), Bayesian networks, or try your hand at creating your own algorithms but want to use some tools useful for doing that (e.g. ready made optimization and linear algebra tools) then check out dlib. I think its great, but I work on it so I'm biased :)

Davis King
  • 4,731
  • 1
  • 25
  • 26
3

Cinder and openFrameworks are awesome toolkits for 'creative coding', as they put it. These libraries, or rather collection of libraries, cover everything from math and networking to 2d, 3d graphics, interfacing various input devices and more.

shakurov
  • 2,358
  • 24
  • 27
3

I enjoy playing around with cimg, its a very good, easy to use image library, good for messing around with :p

http://cimg.sourceforge.net/

Eamonn McEvoy
  • 8,876
  • 14
  • 53
  • 83
3

I know you're proably looking for librarys that you can integrate into your day to day work, but for a home project the C++ Wiimote library might lead to some interesting projects:

http://pawst.com/post/471040-c-wiimote-library

Robben_Ford_Fan_boy
  • 8,494
  • 11
  • 64
  • 85
3

Boost but not the productive part :)

Boost.Xpressive or how to encode regular expressions in templates!

Boost.MPL will shed a new light on the use of template, you'll get a finer grok of template metaprogramming and dug deeper into the subtleties of SFINAE and template deduction.

Boost.Preprocessor will shed a new light on the use and abuse of the preprocessor. It comes very handy when using templates to generate multiple overloads of template functions and classes (and indeed the MPL is based upon it). The interest somewhat dwindle though with the advent of...

C++0x!

The new Standard Library with its threads!

Learn to use std::future and std::function, discover the joy of lambdas, the range-based for syntax, the auto keyword!

C++0x has so many new toys that it almost feels like a new language... and it's also a good brush of your old skills and a good way to stay in.

Matthieu M.
  • 287,565
  • 48
  • 449
  • 722
3

Hiberlite:

a hibernate-like interface to SQLite, someone should write a driver to mysql using OTL!

LLVM:

JIT dynamically new code into your c++

Irrlicht 3D engine

dustin.b
  • 1,275
  • 14
  • 33
lurscher
  • 25,930
  • 29
  • 122
  • 185
2

The last time I had fun digging into something related to c++ was with SWIG. It is a wrapper/interface Generator that let you link your c++ code to Python.

Realizing how simple it is to use SWIG is enlightening and quite fun by itself. Then you can play around mixing Python and C++ libraries.

Have fun!

Community
  • 1
  • 1
log0
  • 10,489
  • 4
  • 28
  • 62
2

For Game development - OGRE
For GUI developement - wxWidgets- CrossPlatform GUI Library

And both the libraries are OpenSource.

Community
  • 1
  • 1
Mahesh
  • 34,573
  • 20
  • 89
  • 115
1

Ogre was already mentioned. If you want to go into 3D, then Panda3D I found easy to learn.

The Player/Stage Project is a robot control interface and simulation library. You could simulate robots or run it on real robots.

thorsten müller
  • 5,621
  • 1
  • 22
  • 30