$ maek
gcc -lz -std=c11 -Wall -Werror -O3 cripper.o -o cripper
cripper.o:cripper.c:(.text+0x197): undefined reference to `inflateInit_'
cripper.o:cripper.c:(.text+0x197): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflateInit_'
cripper.o:cripper.c:(.text+0x213): undefined reference to `inflate'
cripper.o:cripper.c:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflate'
cripper.o:cripper.c:(.text+0x238): undefined reference to `inflateEnd'
cripper.o:cripper.c:(.text+0x238): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflateEnd'
cripper.o:cripper.c:(.text+0x2c2): undefined reference to `inflateEnd'
cripper.o:cripper.c:(.text+0x2c2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `inflateEnd'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'cripper' failed
make: *** [cripper] Error 1
Pretty sure I'm linking to zlib (I'm passing the -lz
flag), and /lib/libz.a
has the offending functions, but the linker somehow can't find these functions.