4 ms·
> Compiler and linker flags are so annoying (...) Hmmm. I'd rather say that some people who package libraries are very annoying! If a library needs specific
by enriquto 4y ago
> Compiler and linker flags are so annoying (...)
Hmmm. I'd rather say that some people who package libraries are very annoying! If a library needs specific compiler flags, or linker flags beyond "-lfoo", this means that somebody is doing something wrong. Out of incompetence or out of malice.
- db48x 4y agoWell, I dunno. libpng needs -lpng16 and -lz. Are you saying that libpng should have a staticly–linked copy of zlib inside of it, so that if your application needs both libpng and zlib you will end up with both? That’s probably unpalatable to most people.
- enriquto 4y ago> libpng needs -lpng16 and -lz Where? I'm compiling the same program with exactly the same makefile on several linux distributions, openbsd, freebsd and macos and "-lpng" is all it needs. This is for dynamic linking. For static linking I need to add -lz explicitly, you are right about that.