zLib 链接错误 XCode 4,未定义的符号

发布于 2024-12-28 07:33:58 字数 1284 浏览 1 评论 0原文

链接错误:

Undefined symbols for architecture i386:  "_unzOpen", referenced from:

我的 xcode 项目中有一个 libz.dylib (构建阶段/链接二进制文件与库) 还可以看到 -lz 链接标志

Ld Debug/DemoOSX_d.app/Contents/MacOS/DemoOSX_d normal i386
cd /Projects/Scorpio/DemoOSX
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Projects/Scorpio/DemoOSX/Debug -L/Projects/Scorpio/DemoOSX/../LibMacOS -F/Projects/Scorpio/DemoOSX/Debug -F/Developer/SDKs/MacOSX10.7.sdk/usr/lib -filelist /Projects/Scorpio/DemoOSX/Debug/DemoOSX.build/Objects-normal/i386/DemoOSX_d.LinkFileList -mmacosx-version-min=10.7 -lz /Projects/Scorpio/DemoOSX/../LibMacOS/SysAudio_d.a /Projects/Scorpio/DemoOSX/../LibMacOS/SysUtils_d.a -lexpat -logg -lvorbis -lvorbisfile /Projects/Scorpio/DemoOSX/../LibMacOS/SysMath_d.a /Projects/Scorpio/DemoOSX/../LibMacOS/SysMemManager_d.a -framework OpenAL -framework SDL -framework Cocoa -o /Projects/Scorpio/DemoOSX/Debug/DemoOSX_d.app/Contents/MacOS/DemoOSX_d

1) 尝试在文件检查器中检查扩展名 - mach o 动态库

2) 尝试构建 32/64 位应用程序

3) 添加其他链接器标志“usr/lib/libz.dylib”

4) 尝试添加标头搜索路径 /usr/include

没有任何帮助:(,可能需要自行构建

ARCHS 32 位英特尔 SDK_ROOT最新10.7 GCC_VERSION 苹果 LLVM 3.0

link err:

Undefined symbols for architecture i386:  "_unzOpen", referenced from:

I have a libz.dylib in my xcode project (Build Phases/Link binaries with library)
also can see -lz link flag

Ld Debug/DemoOSX_d.app/Contents/MacOS/DemoOSX_d normal i386
cd /Projects/Scorpio/DemoOSX
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Projects/Scorpio/DemoOSX/Debug -L/Projects/Scorpio/DemoOSX/../LibMacOS -F/Projects/Scorpio/DemoOSX/Debug -F/Developer/SDKs/MacOSX10.7.sdk/usr/lib -filelist /Projects/Scorpio/DemoOSX/Debug/DemoOSX.build/Objects-normal/i386/DemoOSX_d.LinkFileList -mmacosx-version-min=10.7 -lz /Projects/Scorpio/DemoOSX/../LibMacOS/SysAudio_d.a /Projects/Scorpio/DemoOSX/../LibMacOS/SysUtils_d.a -lexpat -logg -lvorbis -lvorbisfile /Projects/Scorpio/DemoOSX/../LibMacOS/SysMath_d.a /Projects/Scorpio/DemoOSX/../LibMacOS/SysMemManager_d.a -framework OpenAL -framework SDL -framework Cocoa -o /Projects/Scorpio/DemoOSX/Debug/DemoOSX_d.app/Contents/MacOS/DemoOSX_d

1) tried check extension in file inspector - mach o dynamic library

2) tried build 32/64 bit app

3) add other linker flags "usr/lib/libz.dylib"

4) tried add header search path /usr/include

nothing help:(, probably need to build itself

ARCHS 32bit intel
SDK_ROOT Latest 10.7
GCC_VERSION Apple LLVM 3.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞清仓 2025-01-04 07:33:58

unzOpen 函数是“minizip”的一部分,“minizip”是 zlib 的一个附加组件,但不包含在 Apple 版本的 zlib 中。您需要访问 zlib.net 获取 minizip 的源代码。

The unzOpen function is part of "minizip", an add-on to zlib that is not included in Apple's version of zlib. You need to go to zlib.net to get the source code for minizip.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文