My C program uses some zlib functions (like gzopen
, gzread
). I have included the zlib.h
header file in my program and added the -lz
option when compiling, but I still get an error that the gz functions have undefined references. I'm using kubuntu 11.10 and got the following packages installed: libgh-zlib-dev, zlib1g-dbg, zlib1g and zlib1g-dev.
i have tried changing the position of the linking command, but no luck. Here is the one i have at the moment:
CFLAGS=-Wall -pthread -lm -lz -std=c99 -Wextra
-lz
in the wrong place. – Alkylationmake
; it's fed to the C compiler as appropriate. – Tarragon