Is there a good collection library for C-language? [duplicate] - c

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Container Class / Library for C
We have to maintain and even develop C-code of our legacy system. Is there good collection library that would support Java/C# (new versions) style collections. Hashtable, HashSet, etc. Of course without objects, but with structs. The HashTable key limitations to "strings" and ints is not a problem. It wouldn't be bad if it's free even for commercial use. I'm back to C from C# and I must say i'm depressed using our own libraries and the language in general. We're using VS2005 and MS C-compiler if that has nothing to do with anything.
Thanks & BR -Matti

I warmly recommend glib, the general-purpose library that lies underneath the GTK+ widget toolkit. It's excellent.

Here is a hashtable in C, and a more general library here

Related

Using only C (no C++) for OpenGL? [duplicate]

This question already has an answer here:
How to learn OpenGL 3.x using C? [closed]
(1 answer)
Closed 9 years ago.
I want to know if there is a possibility of using OpenGL in C without even scratching c++, tutorials or basic source codes are most welcome!
And if it is possible, how deep would my C skills have to be to understand and use it? I'm currently still mostly learning, and I like to do that by biting off more than I can chew.
OpenGL is a C library, not a C++ one.
The only thing why almost all programs use C++ for OpenGL is there is a higher and simpler level manipulating it through some wrappers, libraries or frameworks. It's just more comfortable.
Here are some good examples which were distributed along with the OpenGL "Redbook" (version 2.0).
However, those examples use old-style OpenGL (rendering through functions), which is deprecated, you should always use shaders and buffers instead. Although I think for beginning it can help.
Here on StackOverflow was also discussed where to find new OpenGL examples.

C data structure libraries [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Generic data structure libraries for C?
Starting off in C programming and wondering if anyone is aware of any library containing implementations of data structures such as linked list, hash maps etc ?
glib. Hard to use if you're just-starting-off because you actually have to know how to get around in pointers.
It's reasonably standard for applications that want to use that sort of thing (excuse the wishy-washy opining).
An option I usually prefer is to wrap C++ STL with C APIs myself. I don't know if there's a standard converter for this. But this is because most developers I work with understand C++-to-C APIs (part of the corporate code landscape at my firm) and STL much better than glib, in which client code tends to be egregiously error prone.

why is C not used so much in GUI programming? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
i see that the C gui libraries are very less. Well the most prominent was GTK and alike. i dont see any prominence of C projects with GUI. Either C is not preferred for GUI. I see for like programming languages like C++, Java and Python, there are more GUI libraries and are more abundant. So what i ask is why does C not have a GUI lirary in surplus like others. Is it because of the absence of object orientation? mostly i see C used in console modes. Even in some system programming, other than that its either C++ or something else for GUI programming. Should one stop GUI design in C and go for other languages? I wish to know this in detail.
I'll speak to the Windows API since that's the one I'm familiar with, but I suspect the others are the same. The Windows API is pure C! There's no need for a "library" to wrap it up, you can program to it directly.
The GUI components make for a good object hierarchy, so it's popular to package them in a C++ wrapper to make them easier to work with, but it's not strictly necessary.
Most GUI libraries work with objects (windows, buttons, widgets, frames, etc.) and properties and such. This is hard to emulate in C, while it is much easier in OO languages like C++, Delphi, C# etc. Note that the underlying APIs these frameworks use are often C, but much more awkward to use than the frameworks.
Since C doesn't natively support any kind of GUI calls, you're going to need
to rely on libraries provided by your system (such as the Windows API or the
Mac Toolbox (pre-OS X)) or a third party (GTK, QT).
Based on the very few times I've done it, I'd say that C is absolutely the
wrong tool for writing GUIs. Depending on the library, it can go from being
merely tedious to downright torture. You have memory management issues out
the wazoo, funky data structures, fairly complex pointer expressions
(something like ((*foo)->bar) wasn't uncommon) . You have to ratchet up
your definition of a "small" program by an order of magnitude.
C doesn't include a gui library but neither does C++.
Most GUI libraries are written in C++ because they began in the mid-late 80s at about the same time that OOP became popular. If you are going to invent a new user interface paradigm you might as well use the new programming paradigm - the more buzz words the better.
There are some natural fits between OOP and GUIs, but you can write a GUI in pure C.
C is a language, it's up to an operating system to provide an API to it's GUI interface.

Is there a repository of C libraries? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Why there is not a comprehensive c archive network?
Like Python has a Cheeseshop and Perl has CPAN?
Google results have a lot of C++ results and I am looking for purely C libraries.
PS: Looking for *nix libraries
Yep. SourceForge, Codeplex, Github, and Google. Also, your distro's packages, if you are on Linux.
Not really, no. Google is really your best friend. Since C doesn't have a standardized body running the language in the same way as, say, Python, there is no central place for packages and marketing material.
Your best bet really is your local Linux distribution - Linux applications generally make heavy use of many layers of libraries, which you can use as a reference.
Well, there's CCAN (although I'm not sure how good it is - never really used it).

Is there a library repository for C? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Why there is not a comprehensive c archive network?
Everyone knows that C is very small language, it has just language primitives and almost no standard library (no data structures or algorithms).
Therefore I have a question, how do I find good C libraries for data structures, algorithms and perhaps system programming?
For example, if I need a hash-table, how do I find a good implementation? Or for example, if I need to work with graphs, what do I do?
So far I have been writing everything myself. But my hash table implementation is nowhere good enough. It's very basic.
What do advanced C programmers do with this problem? Do they really write all the libraries again themselves?
Thanks, Boda Cydo.
GLib.
There really isn't anything as "go to" as Boost in C++ (STL doesn't count as its part of the standard).
Beyond GLib, there is APR
http://directory.fsf.org/category/clibs/
http://ccan.ozlabs.org/
EDIT: CCAN has moved domains to https://ccodearchive.net/
There isn't any set way.... there's just a proliferation of all kinds of frameworks out there. Often there is different forces on what people want, eg, depending if its for embedded systems, PCs, flavor of OS, or whatever.

Resources