引入第三方类文件遇到的问题

1.linker command failed with exit code 1 (use -v to see invocation)

中遇到这类问题,先在右边报错的地方点右键,  (注:linker command failed with exit code 1 (use -v to see invocation) 我在网上查阅资料的时候,看大这一类报错问题,还有别的错误类型,所以要输出错误信息,来确定到底是什么问题)


选择 Reveal in Log; 会在右边窗口中打印出报错信息,





在报错的解释中,我们可以得知,是因为新导入的文件中有C/C++语言,所以要在 target--> Build Setting ---> ENABLE_BITCODE 设置为NO,即可



扫描二维码关注公众号,回复: 1375182 查看本文章


2.关于“ARC forbids explicit message send of release”错误


分别设置ARC选项


分别解决呗。
看图说话:
ARC <wbr>forbids <wbr>explicit <wbr>message <wbr>send <wbr>of <wbr>release-关闭xCode项目的ARC设

需要使用ARC支持的输入 -fobjc-arc
不使用ARC机制,只需要输入 -fno-objc-arc





3. objc_msgSend too many arguments to function call,expected 0, have3 报错解决方案


Build Settings -->  搜索 objc --> 设置 Enable Strict Checking of objc-msgSend Calls    为 NO


 


4 . 

Multiple methods named ' ' found with mismatched result, parameter type or attributes


[[selfprimitiveValueForKey:@"users"]addObject:value];


这是因为 'addObject '报错的这个方法不确定使用这个方法的对象([self primitiveValueForKey:@"users"])是否可以执行这个方法, 

解决办法:声明一下他的类型就可以了,

[((NSMutableSet*)[selfprimitiveValueForKey:@"users"])addObject:value];


5.

Undefined symbols for architecture armv7:  

 "_crc32", referenced from:


是后面跟随的描述的类变量没定义,此时需要导入libz到项目即可。



6.“iPhone” is of a model that is not supported by this version of Xcode. Ple

这个是因为手机版本和X-code不匹配,把X-code要求的版本调低就行


如果还是不行,那就重启一下X-code,就OK了





猜你喜欢

转载自blog.csdn.net/klong27/article/details/71524639