I guess under linux you could use “z” as name and have the libz as name as the result? But yes, would be annoying having to special case between linux and windows, which I assume should end up with zlib.dll?
Yeah, on Unix systems (including Linux), when you link with ... -lfoo -lbar it actually searches for files named libfoo.a and libbar.a (or their shared counterparts).
Fun note: this is why this GNU library is called libiberty – not a typo! They wanted their link lines to look like ... -liberty. Talk about an excess of cuteness!
The question was in case a library does not generate the standard lib prefixed name. I thought that was the case of zlib and was wondering how to handle that idiomatically.
But as zlib actually works as any other lib, this becomes a moot question.