Objective c 获取错误:";架构x86“U 64”的未定义符号;在使用CocoaLumberjack框架时
我已经在现有项目中使用cocoapods安装了cocoaLumberjack框架Objective c 获取错误:";架构x86“U 64”的未定义符号;在使用CocoaLumberjack框架时,objective-c,cocoalumberjack,Objective C,Cocoalumberjack,我已经在现有项目中使用cocoapods安装了cocoaLumberjack框架 # Uncomment the next line to define a global platform for your project platform :ios, '12.0' def shared_pods pod 'CocoaLumberjack' end target 'ABC' do shared_pods end 通过上述pod实现成功安装了框架 我在我的prefix.pch文件中添
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
def shared_pods
pod 'CocoaLumberjack'
end
target 'ABC' do
shared_pods
end
通过上述pod实现成功安装了框架
我在我的prefix.pch
文件中添加了以下内容
#define LOG_LEVEL_DEF ddLogLevel
#import <CocoaLumberjack/CocoaLumberjack.h>
static DDLogLevel ddLogLevel = DDLogLevelDebug;
如果我尝试在我的模拟器中运行项目,在实现了这个之后,我会得到以下错误
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您是否尝试将代码从
prefix.pch
移动到任何其他头文件?
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)