ozark instrucciones inflable doblar desinflar como colchon c compression zlib

instrucciones - Error de desinflar e inflar con zLib



como doblar un colchon inflable (1)

Estoy tratando de compilar el ejemplo zpipe.c en mi Linux (Ubuntu 8.04) con gcc, pero estoy recibiendo algunos errores, eche un vistazo:

[ubuntu@eeepc:~/Desktop] gcc zpipe.c /tmp/ccczEQxz.o: In function `def'': zpipe.c:(.text+0x65): undefined reference to `deflateInit_'' zpipe.c:(.text+0xd3): undefined reference to `deflateEnd'' zpipe.c:(.text+0x150): undefined reference to `deflate'' zpipe.c:(.text+0x1e8): undefined reference to `deflateEnd'' zpipe.c:(.text+0x27b): undefined reference to `deflateEnd'' /tmp/ccczEQxz.o: In function `inf'': zpipe.c:(.text+0x314): undefined reference to `inflateInit_'' zpipe.c:(.text+0x382): undefined reference to `inflateEnd'' zpipe.c:(.text+0x3d7): undefined reference to `inflate'' zpipe.c:(.text+0x44b): undefined reference to `inflateEnd'' zpipe.c:(.text+0x4c1): undefined reference to `inflateEnd'' zpipe.c:(.text+0x4f6): undefined reference to `inflateEnd'' collect2: ld returned 1 exit status [ubuntu@eeepc:~/Desktop]

Recuerda que instalé zLib-dev correctamente, pero ¿por qué obtengo estos errores?


Necesitas vincularlo con la biblioteca zlib también. Simplemente agrega -lz a tu línea de comando.