Hello There, Guest!
View New Posts  |  View Today's Posts
[C++] Recommended cross-platform C/C++ libraries

  • 0 Vote(s) - 0 Average


02-04-2013, 10:53 AM #1
xyv123
Member
**
Posts: 61 Threads:11 Joined: Jan 2013 Reputation: 4

Recommended cross-platform C/C++ libraries
I made a list with some cross-platform C/C++ libraries I've played with over the time and which I liked.
If you have used some other cross-platform C/C++ libraries and you recommend them, please add them to the list, so that other users to be aware of them:

A. For system programming (files, processes, IPC, sockets, threads, ...)
1. libapr (http://apr.apache.org/)
Written in C, is used extensively by the apache web server project.

2. Poco (http://pocoproject.org/)
Very clean and well-designed C++ library. Looking over the sources is very recommended for people learning C++. Look over the unit-tests to learn how to use it, is the fastest way.

3. Boost (http://www.boost.org/)
A large collection of libraries, most of them header-only, covering many areas (collections beyond STL, template metaprogramming, sockets, smart pointers, etc).
Is one of the most heavily used C++ libraries and is highly regarded.
From it, I am mainly using: smart pointers, bind, function, phoenix, threads, asio (for client-server programming), Interprocess, MPL (for template metaprogramming), Boost.Python (for adding Python scripting interfaces to C++ code and for calling C++ code from Python), Random, Regex.

4. ZeroMQ (http://www.zeromq.org/)
Amazingly fast messaging library, with bindings in several languages (such as C, C++, C#,  Java, Python, Ruby, ...)

5. SOCI (http://soci.sourceforge.net/)
Very neat C++ database abstraction library. I have mainly used it with the SQLite backend to store quite a big amount of configuration data.

6. Google Protocol Buffers (http://code.google.com/p/protobuf/)
Very good library for serialization. Has great documentation.
Has official bindings for C++, Java and Python.

B. For Math.

1. LEMON (https://lemon.cs.elte.hu/trac/lemon)
Very good C++ template library for graph algorithms and network optimization. Better than Boost.Graph, IMHO

2. Eigen (http://eigen.tuxfamily.org/index.php?title=Main_Page)
Fast C++ template library for linear algebra.

3. Probability distributions and basic statistics
I've used Math Toolkit from Boost, a little. (http://www.boost.org/doc/libs/1_52_0/lib...dist/html/)
But I mainly use Python for this type of work (scipy, pandas, statsmodels). 

4. For number theory.
NTL (http://www.shoup.net/ntl/).

C. For writing parsers
1. For custom parsers, I used Flex (http://flex.sourceforge.net/) and Bison (http://www.gnu.org/software/bison/)
2. For parsing XMLs, I liked expat (http://expat.sourceforge.net/) and rapidxml (http://rapidxml.sourceforge.net/)

D. For cryptography applications.
1. OpenSSL (http://www.openssl.org/) and Botan (http://botan.randombit.net/)

E. For writing user interfaces
1. Qt (http://qt.digia.com/)
Big, powerful and heavy. Has tons of classes, not only for UI.

2. wxWidgets (http://www.wxwidgets.org/)
Has some other functionalities also, besides writing user interfaces, (such as sockets). But I prefer to use other libraries for this and use wxWidgets only for user interfaces.

F. For 2-D graphics
SDL (http://www.libsdl.org/) and SFML (http://www.sfml-dev.org/)

G. For unit-testing and mocking
googletest (http://code.google.com/p/googletest/). I like it more than Boost.Test.
googlemock (http://code.google.com/p/googlemock/)
Both have great documentation.
This post was last modified: 02-06-2013, 07:44 PM by AceInfinity.

02-04-2013, 01:08 PM #2
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Recommended cross-platform C/C++ libraries
Very good list, but no Loki Shocked!?? http://loki-lib.sourceforge.net/index.ph...n.Download

cheers
This post was last modified: 02-04-2013, 01:16 PM by AceInfinity.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

02-04-2013, 01:19 PM #3
xyv123
Member
**
Posts: 61 Threads:11 Joined: Jan 2013 Reputation: 4

RE: Recommended cross-platform C/C++ libraries
To be honest, I have never used Loki in my code. I know about it, I've looked over it's sources after I have read Alexandrescu's book. I know it had a great impact and influenced other libraries (including boost). But in most cases I found what I have searched for in boost (or write the functionality myself if not there).
This post was last modified: 02-04-2013, 01:21 PM by xyv123.

02-04-2013, 01:26 PM #4
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Recommended cross-platform C/C++ libraries
Fair enough, so the ones provided as "recommended" are all personally tested by yourself in the above list? I like the list though, I'll be using it for my own reference too :)


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

02-04-2013, 01:58 PM #5
xyv123
Member
**
Posts: 61 Threads:11 Joined: Jan 2013 Reputation: 4

RE: Recommended cross-platform C/C++ libraries
Yes, I've played with all the ones I have listed in the first post. Now, many of them were not used in production code, but in some pet projects (most of those projects were never even finished).In production code of a commercial product, I have used: libapr, boost, OpenSSL, Flex, Bison, LEMON and Protocol Buffers. I have also used googletest and googlemock for testing the product.
The other were just used in code I have written at home, during the time.

02-04-2013, 04:33 PM #6
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Recommended cross-platform C/C++ libraries
There were some flaws I was reading about OpenSSL a while back, but I'm not sure what version was reported to have flaws, founded by another developer who was writing a client for data transfer.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

02-05-2013, 05:19 AM #7
Adriana
Senior Member
***
Posts: 300 Threads:53 Joined: Jan 2013 Reputation: 0

RE: Recommended cross-platform C/C++ libraries
What about GTK+ ? It works with Perl too, as far as I know. I haven't used it myself, I'm just trying to help the list with things others say are OK, so don't start throwing tomatoes at me Tongue2

02-05-2013, 05:36 AM #8
xyv123
Member
**
Posts: 61 Threads:11 Joined: Jan 2013 Reputation: 4

RE: Recommended cross-platform C/C++ libraries
OpenSSL is extensively used and flaws are found and reported.
This does not mean one should not use it, but to follow the reported vulnerabilities and upgrade whenever is needed. Between a library used on a large scale, with quite a lot of flaws reported over the time and one which is little used, but with no flaw reported, I would trust more the first one.

(02-05-2013, 05:19 AM)Adriana Wrote:  What about GTK+ ? It works with Perl too, as far as I know. I haven't used it myself, I'm just trying to help the list with things others say are OK, so don't start throwing tomatoes at me Tongue2
GTK+ has bindings to many languages, including Perl. Unfortunately, it's behavior on WIndows is not quite at the same level of quality with the one on Linux/Unices. However, for people developing mostly for Linux/Unix, is an excellent choice. In the Linux world, most graphical user interfaces are written either using GTK+ or Qt (a smaller portion use other libraries such as FLTK, Fox, Lesstif, etc or are using Xlib directly). So, if you are developing for Linux, go ahead and use it. If you want to develop some cross platform product which needs to be compiled also to windows, you can still use it, but I wouldn't use it for windows. In those cases I would still use Qt or wxWidgets. wxWidgets renders native widgets: uses GTK+ on linux and winapi on windows, so the user of your application would have a good UI experience on both systems. Qt draws its widgets (is using non-native widgets on Windows most of the time), but is also themeable and integrates well enough in Windows.
Now, there are GTK+ programs which are used enough also on Windows (Pidgin is one), but, IMHO, Qt or wxWidgets are better choices for building cross platform user interfaces.
This post was last modified: 02-05-2013, 06:00 AM by xyv123.

02-05-2013, 07:16 PM #9
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Recommended cross-platform C/C++ libraries
(02-05-2013, 05:36 AM)xyv123 Wrote:  OpenSSL is extensively used and flaws are found and reported.
This does not mean one should not use it, but to follow the reported vulnerabilities and upgrade whenever is needed. Between a library used on a large scale, with quite a lot of flaws reported over the time and one which is little used, but with no flaw reported, I would trust more the first one.

True, but I think this 'fix' might have been implemented by the developer himself, and not by the devs at OpenSSL, not sure if it transitioned over to a real fix though.

http://forums.apexdc.net/topic/4439-153-...l__openssl


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

02-06-2013, 07:31 PM #10
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Recommended cross-platform C/C++ libraries
This thread is now a sticky btw.


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲




Forum Jump:



Users browsing this thread: 1 Guest(s)