[问题]编译报错: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.o
/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-ccqyiywbeowkgmaitropkiovpeou/Build/Intermediates/xxxx.build/Debug-iphonesimulator/xxxx.build/Objects-normal/x86_64/ClassB.o
ld: duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code (use -v to see invocation)
分析:
变量param1报错,给出了两个类型ClassA和ClassB,查看后发现,在两个类的m文件中都定义了全局静态常量param1;
解决方案:
将其中一个类中的param1重命名改为param2即可~~~
//////////////////////////////////////////////////////////////////////////////
以上是遇到的一种情况,查资料时网上还有人遇到其他错误,也包类似错误的,可以参考一下解决方案:
iOS - 出现( linker command failed with exit code 1)错误总结
ios遇到的错误duplicate symbol xxx in:xxx
[问题]编译报错:clang: error: linker command failed with exit code 1及duplicate symbol xxxx in错误解决方法之一的更多相关文章
- [报错]编译报错:clang: error: linker command failed with exit code 1及duplicate symbol xxxx in错误解决方法之一
今天添加了一个新类(包括m,h,xib文件),还没有调用,—编译遇到如下错误,根据错误提示, duplicate symbol param1 in: /Users/xxxx/Library/Devel ...
- Xcode真机报错clang: error: linker command failed with exit code 1 (use -v to see invocation)
出现这种错误,如下图所示,搜索bitcode,置为NO即可.
- "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:和clang: error: linker command failed with exit code 1 (use -v to see invocation)错误
在项目中使用MWPhotoBrowser未导入ALAssetsLibrary类库时会导致编译时出现异常: "_OBJC_CLASS_$_ALAssetsLibrary", refe ...
- iOS cocoapods导入项目 出现 "___gxx_personality_v0", referenced from: 或者 clang: error: linker command failed with exit code 1 (use -v to see invocation) 错误
今天想导入PNChart 编译的时候出现了 "___gxx_personality_v0", referenced from: 和 clang: error: linker c ...
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
报错提示: ... ld: 6 duplicate symbols for architecture x86_64 clang: error: linker command failed with e ...
- 使用SVN clang: error: linker command failed with exit code 1 (use -v to see invocation)
然后上传到该项目SVN仓库上,例如,下面的错误再次发生再拉到本地编译 ld: library not found for -lxxxxxxxxxxxx clang: error: linker com ...
- clang: error: linker command failed with exit code 1 (use -v to see invocation) 无法定位的问题
编译出现错误:linker command failed with exit code 1 找到Build settings->Linking->Other Linker Flags,将此 ...
- ios clang: error: linker command failed with exit code 1 (use -v to see invocation)解决方法
当xcode编译时出现这个错误,一般是你的编译源码中存在重复的源码 解决方法:"Build Phases" -> "Compile Sources" 去删 ...
- Apple Mach-O Linker Error Group 与 "_OBJC_CLASS_$_XXXXXX", referenced from: 和 clang: error: linker command failed with exit code 1 (use -v to see invocation) 问题.
此问题为链接报错,在Build Settings中的Other Linker Flags添加:-l"XXXXXX"
随机推荐
- 文件和目录之chdir、fchdir和getcwd函数
每个进程都有一个当前工作目录,此目录是搜索所有相对路径名的起点(不以斜杠开始的路径名为相对路径名).当用户登录到UNIX系统时,其当前工作目录通常是口令文件(/etc/passwd)中该用户登录项的第 ...
- cocos2dx下最大纹理大小取决于平台
原文:http://www.cocos2d-x.org/wiki/Max_size_of_textures_in_cocos2d-x_depends_on_each_platform 在理论上,coc ...
- 5 Things They Never Tell You About Making iPhone Apps
http://blog.teamtreehouse.com/5-things-they-never-tell-you-about-making-iphone-apps So, you've decid ...
- python调用smtplib模块发送邮件
#!/usr/bin/env python #coding: utf-8 import smtplib from email.mime.text import MIMEText from email. ...
- java中substring和indexof() 和lastindexof()
java中substring和indexof() 和lastindexof() str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字 ...
- String filePath = request.getSession().getServletContext().getRealPath("/");这句话返回的路径是什么,解释下getRealPath("/")函数中的"/"表示什么意思
request.getSession().getServletContext() 获取的是Servlet容器对象,相当于tomcat容器了.getRealPath("/") 获取实 ...
- 一步一步学NUnit
转载:http://tech.sina.com.cn/s/2009-07-17/1129988785.shtml 单元测试基础知识 单元测试是开发者编写的一小段代码,用于检验被测代码的一个很小的.很明 ...
- oracle定时备份
1.将如下代码复制到文本中,最后将文本后缀名称修改成XXX.bat 批处理文件: *********************************************************** ...
- 使用Eclipse提供的Axis1.x生成WSDL文件以及Server和Client代码
使用Eclipse自带的Axis 1.x来创建一个web service应用的服务端和客户端 Axis 是SOAP WebService协议实现,SOAP实质上是一个基于HTTP POST的请求,以X ...
- 讲解最好的Python正则表达式
这篇文章转载自:http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html#!comments 这里非常感谢作者无私的贡献自己的成果. 请大 ...