整理一个项目遇到的问题之笔记篇

问题: Showing Recent Messages : Linker command failed with exit code 1 (use -v to see invocation)

解决方法:把build setting 里面的Objective-C Automatic Reference Count 改成了NO

///////////////////////////////////////////////////////////////////////////////////////////////

如果你的项目使用的非ARC模式,则为ARC模式的代码文件加入-fobjc-arc标签。
如果你的项目使用的ARC模式,则为非ARC模式的代码文件加入-fno-objc-arc标签。
添加标签的方法:
1.打开:你的target - >Bulid Phases ->Compile Sources。
2.双击对应的*.m文件。
3.在弹出的窗口中输入上面提到的标签 -fobjc-arc / -fno-objc-arc
4.直接按Enter键保存
添加编译报错
#if !__has_feature(objc_arc)
#error This class requires automatic reference counting.
#endif

///////////////////////////////////////////////////////////////////////////////////////////////

问题:Undefined symbols for architecture arm64:
          "_OBJC_CLASS_$****",
          referenced from: objc-class-r

解决:项目 - Build Phases - Complile Sources , 添加 报错 的 .m ,
我是因为自己误删,找了几分钟, 如果xcode bug 也会出现类似现象,

///////////////////////////////////////////////////////////////////////////////////////////////

问题:duplicate symbol '****' in:

l d: 3 duplicate symbols for architecture arm64
clang: error: linker c

解决:进入Target->Build Settings->Apple LLVM 9.0-Code Generation下,将No Common Blocks设置为NO。


解决如下


NTESNormalMessageView.

NTESLiveChatView.

两个没有重复的文件,没有相同的枚举或者引用.m

原因两个文件定义了一个 属性关键字


///////////////////////////////////////////////////////////////////////////////////////////////


问题:kdyld: Library not loaded: @rpath/***.framework/***

         Referenced from: /***

         Reason: image not found

解决:


你可能感兴趣的:(整理一个项目遇到的问题之笔记篇)