views:

104

answers:

2

I'm looking for a C library that provides generic collection data structures such as lists, associative arrays, sets, etc. The library should be stable and well tested. I'm basically looking for something better than the crappy C standard library.

What C libraries fit this description?

EDIT: I'd prefer that the library was cross-platform, but failing that, anything that works on Mac/Linux.

+4  A: 

Apache Portable Runtime has collections (e.g. hash table, linked list) and is, well, portable.

Alex B
+6  A: 

if you are on linux, i would use GLIB. it provides all the helper libraries you would expect, plus its very well maintained and very active (always a +). the link above is straight to the section on data structures, but there is plenty of other things in GLIB so take a look around!

luke
+1, but glib is portable and certainly available on e.g. Windows too.
unwind
Unless the license is an issue.
Alex B
@Alex GLib is licensed under LGPL, so there shouldn't be any issues
qrdl
@qrdl indeed it is. For some reason I was always thinking it was licensed under GPL.
Alex B