tags:

views:

143

answers:

3

I am fairly new to C++ programing, so I am not quite sure what I am looking for at the moment. I have experience with C#, Python (barely), and Visual Basic, but I am looking into using C++ and breaking away from .NET in general (before it completely sucks me in). My questions are as follows:

1) What would be the lightest weight, platform independent GUI library available? Qt to me seems a bit bloated (OpenGL, among other things) . If I am wrong, please let me know.

2) What is the lightest weight, platform independent socket library available? (Please don't bring up winsock2.h)

Thank you in advance. I will continue to Google, but as I said, I am not quite sure what I am looking for, so any and all help is appreciated.

+1  A: 

If you're concerned about cross-platform development you should really checkout wxWidgets as it provides not only a GUI widget set but also other platform independent solutions. (And it's open source and has a nice commercial friendly license attached to it as well).

Furthermore it's modular and you can basically include just the stuff you need - so in that sense it is light weight, or at least it can be.

I've used it in several projects (commercial) with great success and once you get a hang of the API it is quite powerful.

Other alternatives like GTK+ and QT are all good but in my opinion they lack a bit of the support for the underlying plumbing.

Subtwo
Of course, we might as well be starting a Vim vs Emacs discussion here but what makes you say that Qt lacks support for "underlying plumbing"?
Stuart Childs
I was gonna say Stuart, Qt is maintained by it's own special group.
I have nothing against QT, I've used it and I like the way it is designed (as said in other answer here it has a really good OO-design)... I might have to back down a bit about the support for underlying plumbing - it might not be a fair blame.
Subtwo
I think what I'm trying to say is that wxWidgets has a bit more "pragmatic" way of dealing with problems than QT and GTK+ which I think gives you a bit more "closer-to-the-metal" feeling than QT which tries to cuddle you in their API. If you need something "outside the box" you're pretty much on your own. Harder to integrate QT with other 3rd party libraries, etc. But it's just my "emacs" view of things ;-)
Subtwo
@Subtwo I definitely don't disagree about the "closer-to-the-metal" bit. Anyway, like I said I have no delusions about changing religions like favorite libraries and editors :) I was just curious if there was something I didn't know.
Stuart Childs
@TheMyst, yes Qt is maintained by TrollTech (now owned by Nokia) but Nokia have now made it LGPL which is pretty much as good as it gets short of BSD or something. Plus the argument could be made that a commercial entity has a stronger incentive to build and improve their library over people doing it in their free time. My 2 cents. Good luck, C++ was my first love. :)
Stuart Childs
+2  A: 

Qt is not really that bloated (though its libraries are heavy in size -- it is not lightweight in this sence), it's extremely comfortable in use, and contains nearly everything you may need (or may not, probably for the first time, like openGL), though in its own way (QSocket for sockets, QString for strings, so beware not to get suck in it too:)). Another plus (or minus) is that it is not modeled after some popular not-that-strictly-OO libraries like MFC (wxWidgets go this way), but shows an (may be the best) example of really good large-scale C++ OOD (so this may be helpful, also the sources come for free).

mlvljr
Actually a big plus for QT is their free GUI-builder; it is really nice.
Subtwo
Alright, I'll give Qt a try. At least in this way I get a feel for using someone elses code. And I don't plan to sell what I make. It's gonna be free... if I ever finish it that is.
Still accepting answers though.
+3  A: 

As a GUI library I'd use wxWidgets or Qt (as the documentation is quite good and afaik the GUI part can be used independantly of the Parts you don't want).

For Sockets, have a look at Boost Asio, in my opinion it's the best C++ socket library, but the documentation is hard to understand.

tstenner
+1 for Boost Asio. I did my first proper sockets implementation in that a month ago and it was pretty awesome.
Marcus Lindblom