iOS:编译错误 linker command failed with exit code 1(三种情况)

第一种:

将工程中未添加进来的.m问添加进来

参考:http://blog.csdn.net/u013243469/article/details/41118157  详细步骤

第二种:

在错误类型中,起码有相关的类,就是说找不到_OBJC_CLASS_$_XXX,可能里面还有Member,就是说没有这个类的成员。

这时候,我们找到这个类的.m文件:

右侧有个这个(我的是双端)

看勾选了没,

没勾选:编译一下,勾选一下,编译编译后运行

勾选了:取消勾选,编译一下,再勾选,编译后运行

第三种:

看最上面的两行:

duplicate symbol _OBJC_IVAR_$_YSSelButton._delBtn in:

/Users/tangyujie/Library/Developer/Xcode/DerivedData/Dongdaemun-dwxvuryzjgpovgefhcsithkqsoul/Build/Intermediates/Dongdaemun.build/Debug-iphonesimulator/Dongdaemun.build/Objects-normal/x86_64/YSAddVCTopView.o

这就能确定问题出在 YSSelButton 和 YSAddVCTopView 这两个类上,我的问题在YSSelButton是我在YSAddVCTopView中的延展类,但是我在其他类又添加了类名相同的延展类产生了错误

差不多基本能解决,如果还解决不了,等日后我也遇到相同问题再说。

时间: 2024-08-28 17:31:06

iOS:编译错误 linker command failed with exit code 1(三种情况)的相关文章

iOS 编译错误 linker command failed with exit code 1 use v to see invocation

有时多人开发,从svn上checkout代码下来后,会报这样的错误,这个时候很有可能是.a文件的问题,查看项目中的.a文件,特别是你用到的第三方库,pod文件,看看有没有报红的文件,如图显示 有的话,找到对应的.a文件,加到项目中对应的文件位置就行了.

iOS:编译错误 linker command failed with exit code 1 (use -v to see invocation)

将project不加入.m要求加入 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMzI0MzQ2OQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" > 版权声明:本文博客原创文章.博客,未经同意,不得转载.

iOS 报错: linker command failed with exit code 1 (use -v to see invocation) 原因

在iOS开发中,很多人会遇到这样的报错 linker command failed with exit code 1 (use -v to see invocation) 可能的原因如下: 1.引用出错,把***.h弄成了.m,检查一下你的所有引用: 2.再就是你引用第三方的库,你添加文件是系统没有所第三方库的.m文件参入的编译中去,你向项目添加文件得注意了; 3.找到Build settings->Linking->Other Linker Flags,将此属性修改成-all_load或-O

IOS错误诊断之-linker command failed with exit code 1

Xcode最近升级后发现此前所有的项目都无法编译了,报错情况不一, 有些为: -fembed-bitcode is not supported on versions of iOS prior to 6.0 有些为: linker command failed with exit code 1 经过反复尝试,找到了问题的解决办法. 解决方法:选择项目文件,从右侧选择"Build Settings"标签,在构建设置的长长的列表中找到"Build Options"--〉

iOS真机测试友盟碰到错误linker command failed with exit code 1 (use -v to see invocation) 百度地图的检索失败 sqlite 错误码

因为友盟不支持bitcode 在模拟器上运行正常,但是在模拟器上就会报错,这是因为xocde7之后增加了一个bitcode,bitcode是被编译程序的一种中间形式的代 码.包含bitcode配置的程序将会在App store上被编译和链接.bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上. 碰到以上问题,我们有两种解决方式,要么关闭bitcode要么让第三方支持bitcode,我们这里讲第一种,配置bitcode,我们可以 在”Build

iOS真机测试碰到错误linker command failed with exit code 1 (use -v to see invocation)

在模拟器上运行正常,但是在模拟器上就会报错,这是因为xocde7之后增加了一个bitcode,bitcode是被编译程序的一种中间形式的代码.包含bitcode配置的程序将会在App store上被编译和链接.bitcode允许苹果在后期重新优化程序的二进制文件,而不需要重新提交一个新的版本到App store上. 碰到以上问题,我们有两种解决方式,要么关闭bitcode要么让第三方支持bitcode,我们这里讲第一种,配置bitcode,我们可以在”Build Settings”->”Enab

[问题]编译报错:clang: error: linker command failed with exit code 1及duplicate symbol xxxx in错误解决方法之一

今天添加了一个新类(包括m,h,xib文件),还没有调用,-编译遇到如下错误,根据错误提示, duplicate symbol param1 in: /Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-ccqyiywbeowkgmaitropkiovpeou/Build/Intermediates/xxxx.build/Debug-iphonesimulator/xxxx.build/Objects-normal/x86_64/ClassA.

调试错误_ linker command failed with exit code 1 (use -v to see invocation)_ 文件 添加问题

问题类型: 编译错误 问题描述: 文件链接错误 d: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Library/Fram

【issue】"linker command failed with exit code 1" [xcode7]

问题:升级Xcode7 后第三方库真机编译出现 linker command failed with exit code 1 解决:build settings 修改 Enable Bitcode yes改为no 关于 Bitcode理解