Beheben: /usr/bin/ld: cannot find -lzlib
English
Deutsch
Problem:
Sie möchten eine C++-Programmdatei kompilieren, die zlib verwendet, aber Sie sehen eine Fehlermeldung wie
output.txt
/usr/bin/ld: cannot find -lzlib
collect2: error: ld returned 1 exit statusLösung
Verwenden Sie -lz anstelle von -lzlib. Die zlib-Bibliothek heißt libz.so, nicht libzlib.so!
Beispiel:
build.sh
g++ -o ztest zpipe.c -lzCheck out similar posts by category:
C/C++
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow