Mac Zlib未定义的架构x86_64符号:

时间:2014-04-21 12:24:52

标签: c++ c macos zlib

我正在尝试使用Xcode中的zlib.h构建一个简单的程序来读入和膨胀.gz文件。虽然在构建程序时我得到了臭名昭着的

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)

对于zlib方法inflate,inflateEnd等。

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

由于 萨姆

0 个答案:

没有答案