My project uses zlib:
println!("cargo:rustc-link-lib=static=zlib");
which was working but now gives:
error: could not find native static library zlib
, perhaps an -L flag is missing?
ldconfig -p | grep libz
libz3.so.4 (libc6,x86-64) => /lib/x86_64-linux-gnu/libz3.so.4
libz3.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libz3.so
libzstd.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libzstd.so.1
libz.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libz.so.1
libz.so.1 (libc6) => /lib32/libz.so.1
libz.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libz.so
If I change to dynamic:
println!("cargo:rustc-link-lib=zlib");
I get lots of undefined reference errors related to zlib:
zmbv.c:(.text.unlikely+0x16): undefined reference to
inflateEnd'`