tags:

views:

261

answers:

4

I'm quite new to programming, and I was wondering if there is a good source of well-programmed non-standard C code and libraries.

I Googled and didn't find anything. I was a bit surprised by this, especially because I used to search for many Python examples and libraries and never had trouble finding anything.

I already use standard libraries such as stdio.c, stdlib.c, and math.c, but I want to use some more specific C modules. A graph processing library, for example. (I don't really need this one, just a collection of C, not C++ or C#, resources and examples)

+4  A: 

Hi Manuel, there is no "centralized" source for C libraries... at least nothing along the lines of CPAN for Perl or the Python Package Index for Python.

Since C is sort of the "default" language for systems programming, it's often unstated that libraries are written for C. You may want to try Freshmeat.net's Advanced Search, since it's centered on Unix software, and there are a lot of C libraries posted there. For example, here's what I come up with searching for "graph library": http://freshmeat.net/search/?section=projects&q=%2Bgraph+%2Blibrary, and you can filter those results by language, license, etc.

(And your English is quite fine! Which I can't say about all the posters on here :-p)

Dan
+1  A: 

I don't know of any C specific collections of modules. If I were looking for C modules, I'd check sourceforge and freshmeat. Glib is a fantastic library, too.

postfuturist
+3  A: 

If you're looking for a good repository of C code to examine and learn from then I recommend the GNU stuff. You can find anything from small programs like cat to extremely large projects like Emacs and Gnome. All the code is released under the GPL and can be freely incorporated into GPL'd free software.

Kyle Cronin
"small programs like cat to extremely large projects like Emacs" -- Yeah nobody we see the photo of your small program, now where's the photo of your large project? ... In our house, our pet name for our cat is "somebody". When a coworker said "somebody deleted X", I wondered how a cat could delete.
Windows programmer
+1  A: 

You might also consider the book Numerical Recipes in C++ or the older Numerical Recipes in C (it might be out of print, though), depending on your algorithmic needs.

[EDIT] I didn't originally see this, but I found a link to the older book here.

tvanfosson