Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boost like libraries in C [closed]

Tags:

c

boost

People also ask

Does Boost work with C?

Boost can't be used with C as it uses OOP features from C++. It may be technically possible to develop a wrapper for it.

Is Boost library still useful?

After 20 years of active Boost development, it's now recognized as a very powerful C++ library, for each major version many C++ libraries from the community were added. The Boost reviewers have an advanced C++ skills and their contributions guarantee a high quality for many years.

Are Boost libraries open-source?

Boost is licensed under its own free, open-source license, known as the Boost Software License.

Is Boost better than STL?

Ultimately, you should learn both. But STL can be learned in isolation, whereas boost won't make much sense until you understand the STL, since that's what Boost is modeled on, and designed to extend. So learn to use the STL as part of learning c++.


+1 for GLib from me, too. Plus, it has its own threading API too, so you don't have to learn pthreads if you don't want to.

Not sure if there exists such a thing as "smart memory management" in C, it's not very easy when you don't have the safety nets of destructors and control over operators. But, again, GLib has plenty of memory-oriented data structures and stuff that really makes life easier.

And no, I'm not on the GLib team, but I really do like it. :)


Check out the Apache Portable Runtime (APR) project.

Some of it's features:

  • memory management API
  • threads, mutexes
  • file I/O
  • atomic operations
  • hash tables, arrays
  • network sockets and protocol
  • shared memory, mmap

Not to mention it's portable.


I'm not sure if you'll find a single library that covers all of that... but you can check out glib and pthreads to cover a good bit of that.


Look at Boehm GC a widely used conservative garbage collector for C (or C++) that might serve your needs as far as smart memory management is concerned.