Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.C を png にコンパイルしようとするときに助けが必要です
gcc --std=c99 -Wall -lz a.c -o a.png c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lz collect2.exe: error: ld returned 1 exit status
これは何を意味するのでしょうか?
libz.soエラー メッセージから、リンカは、またはが見つからないことを示していますlibz.a。独自のパスからそのライブラリを提供している場合は、リンカにパスで検索する必要があることを伝えます。
libz.so
libz.a
gcc --std=c99 -Wall -Ldir -lz a.c -o a.png
使用する
ld -lz --verbose
リンカーが libz を検索した場所を確認します。