paulgorman.org/technical

C programming a unix-like environment

Tue 19 Jan 2021 04:27:26 PM EST

C is the language of unix.

GCC or Clang

As of 2021, maybe GCC.

Clang was better for a period, but Clang’s gains seem to have shocked GCC into catching up and may surpassing Clang.

Both are good.

The licensing differs, so that may affect your choice.

Where is that library file?

The whereis command finds source files, not just binaries.

🐚 ~ $ whereis utmpx.h
utmpx: /usr/include/utmpx.h /usr/share/man/man5/utmpx.5.gz

Is there any documentation for the C libraries?

🐚 ~ $ man 3 getutxent
🐚 ~ $ man 2 syscalls

https://en.cppreference.com/w/c

https://www.gnu.org/software/libc/manual/

The cppreference is available offline as Debian package that can be read in the Devhelp utility.

🐚 ~ $ sudo apt install cppreference-doc-en-html devhelp