Skip to content
Advertisement

How to view the list of c library functions in Linux? [closed]

I’m a newbie in Linux programming. I found that the way to view the list of system calls in Linux via command-line is: man syscalls

But now I want to view the list of c library functions, how can I do that? Which command will help me list the c library functions? And another question, where are system calls and c library functions manual pages located? Thank you.

Advertisement

Answer

System calls man pages are located in the section 2 of the man pages, see intro(2), and their list in syscalls(2)

Library functions man pages are located in the section 3 of the man pages, see intro(3). There are many of them (and most of them use some syscalls, but some don’t need any syscalls e.g. round(3)).

And some useful Glibc specific functions don’t have man pages, for example argp functions.

As Elliot Frisch commented, see Gnu libc documentation.

BTW, you could use something else than GNU libc, for instance musl libc.

You should also read Advanced Linux Programming and some pthread tutorial.

Read also the Posix opengroup documentation.

At last, Linux also have many very widely used libraries, like ncurses and gnu readline for terminal I/O, and GTK or Qt for graphical user interfaces above X11 (both having a foundational library : Gobject+Glib for GTK, and QtCore for Qt, which is useful by itself outside of any GUI programs).

And freecode, sourceforge, github and many other places mention many free software libraries, most of them being developed on Linux. For instance libonion is a useful library giving you HTTP server abilities.

For databases, see mariadb, mongodb, postgresql, gdbm, sqlite etc… (and jansson for JSON textual serialization)

BTW, your Linux distribution should give you a lot of development packages too. On Debian more than 200 packages match lib*dev package name (and some libraries have a development package named differently).

There are several good books about Linux programming, see this

Be aware that Linux is mostly free-software friendly. Give attention to software licenses and their compatibility.

If possible, make your own Linux software project a free software, e.g. by publishing it with a license like e.g. GPLv3 (early, even barely working, in alpha stage…) on some site like github or gitorious or sourceforge etc… You could get useful feedback.

You might consider coding in C++11 (which can use C or C++ libraries easily). Notice that C++11 is really different from previous versions of the C++ standard. If you do, be sure to use a recent compiler, like GCC 4.8. You could even consider customizing GCC with MELT if your software is complex enough to worth the effort.

Advertisement