Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the common libraries for C? [closed]

Tags:

c

libraries

C++ has STL and Boost and C# has the .net Framework library. Similarly, what are the most common libraries useful to a C programmer? (Other than the C standard library.)

I am looking for most of the capabilities available in the STL: containers (vectors, linked lists, trees, hash table), algorithms (sorting, searching), file IO and strings.

Ideally, the library should be open-source, work on Windows (cross-platform is fine) and is being used actively.

like image 799
Ashwin Nanjappa Avatar asked Feb 14 '11 03:02

Ashwin Nanjappa


People also ask

What is the basic library for C?

The C standard library or libc is the standard library for the C programming language, as specified in the ISO C standard. Starting from the original ANSI C standard, it was developed at the same time as the C library POSIX specification, which is a superset of it.

How many C libraries are there?

The ANSI C standard library consists of 24 C header files which can be included into a programmer's project with a single directive. Each header file contains one or more function declarations, data type definitions and macros. The contents of these header files follows.

Where are the C libraries?

In the gcc manual it is given that "The C standard library itself is stored in '/usr/lib/libc.


1 Answers

If you want general-purpose data-structures like STL has, glib is probably the answer to your question. But a better question might be why are you writing your program in C? C's potential to shine comes when you don't use overly-general code to perform tasks that could be better performed in ways specific to your particular task at hand. glib just gives you "C++ with ugly syntax" (and less ability for the compiler to optimize).

like image 74
R.. GitHub STOP HELPING ICE Avatar answered Nov 10 '22 22:11

R.. GitHub STOP HELPING ICE