Mac Zlib ndefined characters for x86_64 architecture:

I am trying to create a simple program using zlib.h in Xcode to read and inflate a .gz file. Although when I create the program I get the infamous

Undefined symbols for architecture x86_64:

 "_inflate", referenced from:
      decomp() in main.o
  "_inflateEnd", referenced from:
      decomp() in main.o
  "_inflateInit2_", referenced from:
      decomp() in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

For zlib methods, inflate, inflate End, etc.

#include <zlib.h>
#include <stdio.h>
#include <stdlib.h>
int main(){
...inflate method here..}

Thanks Sam

+4
source share

Source: https://habr.com/ru/post/1537370/


All Articles