3 ms·
Is there a reason C libraries generally prefix with 'lib'? Or is it just historic?
by totalperspectiv 7y ago
Is there a reason C libraries generally prefix with 'lib'? Or is it just historic?
- colonwqbang 7y agoIf you pass -lcodr7 to the Unix C linker, it would typically go looking for a file called libcodr7.so. You could perhaps view this as mainly historic behaviour. Some libraries like Cairo seem to be generally known as "Cairo", not "Libcairo". But there is also a trend for libraries to have very straight-to-the-point names. If the PNG parsing library is called libpng.so and the XML parsing library is called libxml.so, it would be confusing to call these libraries just "Png" and "Xml". As an other example, the two C programs "systemd" and "libsystemd" live in the same repo, but are really two different beasts: libsystemd might be useful to you even on a system which doesn't use systemd.
- codr7 7y agoBesides this; codr7 is my alias, and I wouldn't want to be confused with a C library.