6
$\begingroup$

Today I saw a lot of C++ libraries and frameworks on Awesome C/C++. Now I am confused as to which should I learn, or does it depends upon my choice?

I want to learn C++ libraries and frameworks, for GUI development, but I don't know which is beginner friendly.

$\endgroup$
8
  • 2
    $\begingroup$ Quite the broad question. You'd get better answers if you mention why you're learning C++ and what your hobbies are. $\endgroup$
    – Navin
    Mar 3, 2022 at 10:49
  • 1
    $\begingroup$ @Navin: i want to start gui development! $\endgroup$
    – Hamza
    Mar 3, 2022 at 14:00
  • 2
    $\begingroup$ @Hamza QT is a quite popular and portable framework for GUI programming. If you want to combine it with 3D you can look at Unity or OpenGL or DirectX.. $\endgroup$ Mar 3, 2022 at 17:04
  • $\begingroup$ @mathreadler : yes i am learning qt! $\endgroup$
    – Hamza
    Mar 3, 2022 at 17:46
  • $\begingroup$ I will argue that C++ GUI is probably not a good idea. Non modern OSs choose C++ as GUI development. $\endgroup$ Mar 21, 2022 at 2:21

4 Answers 4

9
$\begingroup$

I think it depends on the domain that you are using C++ for. There are a lot of libraries that you can learn how to use and then never use them in your life, but when you know exactly what you need then it is easier to find libraries that would help you.

In general, I think it is a good idea to learn the standard template library (STL), it provides four components called algorithms, containers, functions, and iterators. I think most C++ programmers have used it at some point.

You can also check the BOOST libraries, check their website here.

For other domains there are tons of libraries that you can learn, for various computer vision utilities you can learn opencv for example, for developing machine learning models you can learn tensorflow for example.

$\endgroup$
5
  • $\begingroup$ i will accept your answer but i have question : almost every programmer can use stl ok but i want to develop something live gui program or something which appears on screen .. then what can i do ? $\endgroup$
    – Hamza
    Mar 2, 2022 at 14:33
  • 1
    $\begingroup$ @Hamza learn different GUI libraries $\endgroup$
    – bb1950328
    Mar 2, 2022 at 14:57
  • $\begingroup$ @bb1950328 : but i don't know which lib , and how to ? $\endgroup$
    – Hamza
    Mar 2, 2022 at 15:05
  • $\begingroup$ GTK, Wx, and Qt are all solid choices for GUI. Personally, I've found Tk (that's different than GTK, by the way) to be very simple and easy-to-learn, at the cost of not being as powerful. $\endgroup$ Mar 2, 2022 at 20:47
  • 2
    $\begingroup$ You probably mean the C++ standard library. STL is a distinct and previous library and searching for it online will give you out of date results that only diverge further as C++ adds more features. stackoverflow.com/questions/5205491/… $\endgroup$
    – qwr
    Mar 3, 2022 at 2:46
5
$\begingroup$

As others said learning stl and getting a look at boost is probably a good idea. For Gui / rich clients, Gtk/QT/wx. But you asked for something to see on screen, you could look for graphics library, often used to make games. opengl/DirectX for low level, a bit more high sdl/sfml or go for full engines ogre3d...

There is a lot of c++ libraries and as a self learning person, you will be guided by tutorials, you'll find on internet, so choose something you are interested in, something that you can run on the target and development device (portability), and something widely supported.

In each case, you must compare each libraries to see wich one is the easiest to fullfill your goal, there is no global answer. In the case of Gui widget for example, i advise you to try at least 2 and see wich one better fill your need. try to do a demo application with Qt and gtk for example, see how thoses library are differents and weight your needs.

$\endgroup$
1
  • $\begingroup$ For you too: You probably mean the C++ standard library. STL is a distinct and previous library and searching for it online will give you out of date results that only diverge further as C++ adds more features. stackoverflow.com/questions/5205491/… $\endgroup$ Mar 3, 2022 at 16:44
4
$\begingroup$

That's a very long list, and as others have said, you could burn a load of time and not ever use the knowledge. Also the list is 7 years since the last update, so it's hardly current. Quite a few of the things listed are niche - I haven't encountered them in 20 years working with C++ - or dead (broken links).

As far as choosing a GUI toolkit goes, the objective advice is:

  • Pick something that runs in the environment you need to work in (don't learn Microsoft Foundation Classes if you want to run on a Mac).
  • Pick something current and well supported (don't learn Microsoft Foundation Classes).
  • Pick something well-known that you are likely to be able to use in the future. Subjectively, I would suggest that QT, GTK+ or possibly WxWidgets are the three libraries likely to meet these requirements - but depending on the environment and licensing model that you want, you may disagree.
$\endgroup$
4
  • $\begingroup$ can u tell me how to learn these GUI libraries . and what about other C++ libraries ? std2 etc ... $\endgroup$
    – Hamza
    Mar 2, 2022 at 18:20
  • $\begingroup$ @Hamza you spend a lot of time here asking about way too manythings. May I suggest that you first learn one thing before you go on to the next? $\endgroup$ Mar 3, 2022 at 2:25
  • 3
    $\begingroup$ @Hamza, To actually learn it, you need to use it. When you have a goal (it doesn't need to be a complicated one; break it it up into tiny chunks if it is), you'll keep on asking yourself "how do I do this particular thing", and that's when you'll have to read documentation or find already answered questions on forums. I spend my time trying to find the best practice for a particular task, or figuring out what a particular function does. Task -> code draft -> Question(s) -> documentation/forums -> THEN code. Start by writing ANYTHING to avoid the blank page then fill in the blanks. $\endgroup$
    – J. Quick
    Mar 3, 2022 at 10:02
  • $\begingroup$ Also, don't forget to compile regularly to see a small list of errors and warnings before you get drowned in problems. $\endgroup$
    – J. Quick
    Mar 3, 2022 at 10:04
0
$\begingroup$

To call now popular microservices you need libjson-c and libcurl. It may be any other json library or framework, i believe for C++ rapidjson will be better, but curl has no options (libwebsockets?). Also librdkafka (librdkafka++ for C++) to connect to Apache Kafka and libavro to describe data. To understand how microservices work in general, you may wish to look into event libraries like libevent, libev, libuv. Some xml handling may be needed, this is done by libxml2 (if you are using oracle you can use oracle xdk).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.