gpt4 book ai didi

ios - Cocoa Pods 在 Debug模式下运行时链接库失败?

转载 作者:技术小花猫 更新时间:2023-10-29 10:46:13 28 4
gpt4 key购买 nike

我正在使用 pods 链接库,例如 AfNetworkingfacebook 等,它在 release 中运行良好模式,但我想通过调试检查变量值,但它在 Release模式下显示所有变量 nil。我尝试通过编辑模式以 debug 模式运行,但编译失败,显示各种库未找到错误。

编辑 我已尝试更新架构......但这无济于事。 Debug模式下的错误日志

ld: warning: directory not found for option '-L/Users/madept/Desktop/personally/Pods/build/Debug-iphoneos'
ld: warning: ignoring file /Users/madept/Desktop/personally/libCloudinary.a, missing required architecture x86_64 in file /Users/madept/Desktop/personally/libCloudinary.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_BITHockeyManager", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_CLCloudinary", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_CLTransformation", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in Chat.o
objc-class-ref in ZRManagedObject.o
objc-class-ref in ZRTelescopingScrollView.o
objc-class-ref in ZRAddMessageBarController.o
objc-class-ref in ZRCreateAccountViewController.o
objc-class-ref in ZRAddressBookHelper.o
objc-class-ref in Zooplr.o
...
"_OBJC_CLASS_$_DDTTYLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_ELCAlbumPickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_ELCImagePickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZAudioPlotGL", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZMicrophone", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZRecorder", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_FBErrorUtility", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ZRAppDelegate.o
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in ZRAnalyticsTracker.o
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_SSKeychain", referenced from:
objc-class-ref in ZRAuthManager.o
"_OBJC_CLASS_$_SVProgressHUD", referenced from:
objc-class-ref in ZRAccountEditViewController.o
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_SocketIO", referenced from:
objc-class-ref in ZRChatSocketClient.o
"_OBJC_CLASS_$_TTTAttributedLabel", referenced from:
objc-class-ref in ZRBubbleViewTextMessage.o
"_kReachabilityChangedNotification", referenced from:
-[ZRAppDelegate application:didFinishLaunchingWithOptions:] in ZRAppDelegate.o
-[ZRChatSocketClient init] in ZRChatSocketClient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如有任何帮助或建议,我们将不胜感激。

最佳答案

如果上述答案对您不起作用,则问题可能出在您安装 pod 时。检查你在运行 pod install

时是否有这样的信息

The ProjectName [Release] target overrides the OTHER_LDFLAGS build setting defined in `Pods/Target Support Files/ProjectName/Pods-ProjectName.release.xcconfig'. This can lead to problems with the CocoaPods installation

或类似的消息,但使用 debug 而不是 release(或两者)。如果是这样,请删除 Xcode 工作区中的 pod 项目,然后按照此问题的答案 The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig 进行操作,我在这里过去了:

This definitely works most of the time:

Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.

然后再次运行 pod install。它为我做到了。

关于ios - Cocoa Pods 在 Debug模式下运行时链接库失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27188602/

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