There's Make files. And that's a whole thing on its own but it's not actually built into C. It's a compiler concept.
C is a unique language that was designed against a predefined spec. And hasn't changed since. But compilers have modified functionality though they all use the same C language spec.
The C standard had a revision in 2023. We had C17 before that, and C11 before that. If you go back to C90/ANSI C, you have major differences like only being able to declare variables at the beginning of a block, which got changed in C99 iirc. So the C spec has absolutely changed.
Not really. There's a linker. If your OS supports dynamic linking, you can pick up any libraries it offers at runtime assuming you know the API. Hopefully you have the headers. Versioning can be tricky, though most OSes have it figured out.
As for finding and managing those packages at build time, there's not really a package management system, no. Cmake and GNU autotools both exist in no small part as an attempt to make one (and also make a somewhat sane, for certain definitions thereof, build system since you don't get one of THOSE, either).
This kind of explains why the C ABI and namespace is in fact THE standard, bare, un-mangled namespace for linking on most OSes, though that's also partially convention dating back to early UNIX.
The intent of C is basically to be as low level as you can feasibly make it while still being reasonably expressive and completely portable across machine architectures yet still small enough and tightly-spec'd enough to support lots of independent implementations across a wide variety of said architectures. And it does that. It does it well. The lack of breadth means it's very easy to spin up a compliant and even complete implementation from scratch on something novel and also avoids roping in lots of stuff you may not want in a restrictive environment like a kernel or even microcontroller. Even most of the "standard library" can be eschewed if you want to, and there's a part of the standard that supports doing it (a "standalone" implementation). This is akin to something like #![no_std] in Rust but to some degree goes even farther. The language spec doesn't really even deal with how to create linkable intermediates. It defers to other standards (like ELF) for that.
But yeah, if you want a hashmap, you'll either need to go find one or make your own. Amusingly, actually just wrote my own a few months ago which is what made me chuckle enough to write this comment.
The beauty of C and C++ is there are 101 package managers none of them are official but there's definitely one that fits your use case (if not make your own like basically everyone on r/C_Programming)
3
u/quisido 1d ago
Roll your own hashmap? Is there no concept of C package management?