gpt4 book ai didi

ios - 链接 Xcode 6/LLVM 6 的选择性库

转载 作者:可可西里 更新时间:2023-11-01 17:17:30 25 4
gpt4 key购买 nike

我根据项目build设置中的配置有选择地链接库。即

调试:-l libcws_ps发布:-l libcws

在库搜索路径中,我指向包含这 2 个 .a 库的目录。

我要指出这在 Xcode 5 上有效,但现在在 Xcode 6 上它没有正确链接并且我收到 undefined symbol 错误。如果我使用通常的方法进行链接——“将二进制文件与库链接”,那么它就可以工作——但是我没有基于配置的链接。

关于如何解决这个问题的任何想法,或者至少有一些关于如何调试它的线索?

Libtool /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos/libiOSIrdetoLibrary.a normal armv7
cd /Users/dave/Developer/GIT/FilmFlex/iOS/Submodules/iOSModelController/Submodules/iOSIrdetoLibrary
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos -LCloakwareStreaming/lib/ios -L/Users/dave/Developer/GIT/FilmFlex/iOS/Submodules/iOSModelController/Submodules/iOSIrdetoLibrary/CloakwareStreaming/lib/ios -filelist /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Intermediates/iOSIrdetoLibrary.build/Release-iphoneos/iOSIrdetoLibrary.build/Objects-normal/armv7/iOSIrdetoLibrary.LinkFileList -framework MediaPlayer -framework CoreVideo -framework AVFoundation -framework UIKit -framework Foundation -o /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos/libiOSIrdetoLibrary.a

最佳答案

RTFM... 或 RTFRN... Xcode 6 release notes

“在构建静态库时,Xcode 将不再将build设置 OTHER_LDFLAGS 中的选项传递给 libtool,在构建任何其他类型的产品时,它也不会将 OTHER_LIBTOOLFLAGS 中的选项传递给 Mach-O 链接器。以前这两个设置中的所有选项都会传递给这两个工具。确保选项在产品类型、静态库或其他正在构建的组件的正确build设置中。(4285249)”

所以它甚至没有传递我的“其他链接器标志”。我需要将它们移至“其他图书管理员标志”。

关于ios - 链接 Xcode 6/LLVM 6 的选择性库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25768448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com