5 ms·
Of all things C is missing the ability to import binary assets. Which is kinda deranged when you think about it.
by Gibbon1 6y ago
Of all things C is missing the ability to import binary assets. Which is kinda deranged when you think about it.
- shakna 6y agoFor runtime, you can certainly read any arbitrary binary file in C without problems. For compile time, I make heavy use of xxd -i to generate header files in a range of projects. It is no longer installed by default on most +nix systems, but it is generally still in your package manager (often installed alongside vim), and has been around since 1990.
- anitil 6y agoOh I wish I'd known about 'xxd -i' ! When I saw it in the video linked above I was so annoyed that I hadn't used it before
- pjmlp 6y agoISO C surely, C based SDKs on macOS and Windows do support embedding resources since 16 bit days.