Ios Cocoa Pods在调试模式下运行时链接库失败?
我正在使用Ios Cocoa Pods在调试模式下运行时链接库失败?,ios,objective-c,xcode,cocoapods,Ios,Objective C,Xcode,Cocoapods,我正在使用pods链接库,如AfNetworking,facebook等,它在release模式下工作得很好,但我想通过调试检查变量值,但在release模式下显示所有变量为零。我试图通过编辑模式在debug模式下运行,但编译失败,显示各种未找到的库错误 编辑我尝试过更新架构……但这没有帮助。 调试模式下的错误日志 ld: warning: directory not found for option '-L/Users/madept/Desktop/personally/Pods/build/
pods
链接库,如AfNetworking
,facebook
等,它在release
模式下工作得很好,但我想通过调试检查变量值,但在release模式下显示所有变量为零。我试图通过编辑模式在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)
任何帮助或建议都将不胜感激。这意味着您正在使用的静态库不支持x86_64体系结构,
所以
如果上述答案不适用于您,那么问题可能来自于您安装吊舱时。检查您在运行
pod install
ProjectName[Release]目标会覆盖“Pods/target Support Files/ProjectName/Pods ProjectName.Release.xConfig”中定义的其他\LDFLAGS
生成设置。这可能会导致CocoaPods安装出现问题
或类似的消息,但带有debug
而不是release(或两者兼有)。
如果是这样,请在Xcode中删除您工作区中的pod项目,然后按照此问题的答案进行操作,我在这里跳过它:
这在大多数情况下确实有效:
转到目标生成设置->其他链接器标志->双击。将$(继承的)添加到新行
然后再次运行
pod install
。它为我做到了。删除/Users/YourName/Library/Developer/Xcode/DerivedData/YourProject/Build/Products/Debug iphoneos中的.a文件。然后清理并构建。这对我有帮助。我已经删除了.a文件,它对我不起作用,但是当我删除/Users/YourName/Library/Developer/Xcode/DerivedData/YourProject中的项目文件夹时。
这对我有帮助。对我有用的是将$(继承的)添加到:
- 其他标志
- 其他缺陷
- 框架搜索路径
- GCC_预处理器_定义
提示:内部构建设置->(搜索栏)->键入上面的选项并添加$(继承)验证您的用户标题搜索路径等。调试和发布模式是否不同…如果不同,我们如何设置?似乎您需要为您的解决方案尝试的所有targetsI添加架构,它有点像现在的ld:warning:directory not found for option'-L/Users/madept/Desktop/personal/Pods/build/Debug iphoneos'ld:warning:ignoreding file/Users/madept/Desktop/personal/libCloudinary.a,在file/Users/madept/Desktop/personal/libCloudinary.a中缺少所需的架构x86_64(3个片段)架构x86_64的未定义符号:“_OBJC_CLASS_$_CLCloudinary”,引用自:ZRMediaManager.o中的OBJC CLASS ref“_OBJC_CLASS_$_CLTransformation”,引用自:ZRMediaManager.w中的OBJC CLASS ref,带有“Pods”的意思是“Cocoapods”?FWIW,我遇到了同样的问题,在运行pod安装时没有收到任何警告。不必删除我工作区中的pod项目。我在其他链接器标志中添加了$(继承的),并清理了pod目标(从产品>方案,更改方案和清理)重新启动了xcode,它工作了。希望这对别人有帮助。谢谢!这对我来说很管用,但没有别的办法。