今天添加了一个新类(包括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错误解决方法之一的更多相关文章

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

    今天添加了一个新类(包括m,h,xib文件),还没有调用,—编译遇到如下错误,根据错误提示, duplicate symbol param1 in: /Users/xxxx/Library/Devel ...

  2. Xcode真机报错clang: error: linker command failed with exit code 1 (use -v to see invocation)

    出现这种错误,如下图所示,搜索bitcode,置为NO即可.

  3. "_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 ...

  4. 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 ...

  5. 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 ...

  6. 使用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 ...

  7. 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,将此 ...

  8. ios clang: error: linker command failed with exit code 1 (use -v to see invocation)解决方法

    当xcode编译时出现这个错误,一般是你的编译源码中存在重复的源码 解决方法:"Build Phases" -> "Compile Sources" 去删 ...

  9. 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"

随机推荐

  1. Linux下history命令详解---转载

    Linux下History命令主要用于显示历史指令记录内容, 下达历史纪录中的指令 . >History命令语法:[www.linuxidc.com@linux]# history [n][ww ...

  2. Bash For Loop Examples for Your Linux Shell Scripting--ref

    There are two types of bash for loops available. One using the “in” keyword with list of values, ano ...

  3. Eclipse的LogCat总是自动清空怎么办?

    我们经常会遇到这样一种情况,由于Log太多,导致我们的LogCat总是被自动清空,该怎么办?错误信息看不到,How to do? 其实,我们通过adb shell来解决这个问题. 1.配置环境变量 环 ...

  4. Android(java)学习笔记165:Android的Junit调试

    编写android应用的时候,往往我们需要编写一些业务逻辑实现类,但是我们可能不能明确这个业务逻辑是否可以成功实现,特别是逻辑代码体十分巨大的时候,我们不可能一行一行检查自己的代码,为了解决这样的问题 ...

  5. 使用CocoaPods遇到的几个坑,记录一下

    最近使用pod的时候升级到1.0.0版本后遇到一些坑,整理一下 首先是CocoaPods报错:The dependency `` is not used in any concrete target ...

  6. Learning Django Resources

    Learning Django Django makes it easier to build better Web apps more quickly and with less code. Web ...

  7. Java并发——线程池Executor框架

    线程池 无限制的创建线程 若采用"为每个任务分配一个线程"的方式会存在一些缺陷,尤其是当需要创建大量线程时: 线程生命周期的开销非常高 资源消耗 稳定性 引入线程池 任务是一组逻辑 ...

  8. 安装Sass的一些注意事项

    文章的内容都来自网络: 1. RubyGems 镜像 2.  compass watch,我们的Sass种如果出现了中文, 就会出现编译错误,我们需要: 找到ruby的安装目录,里面也有sass模块, ...

  9. jbpm4 回退、会签、撤销、自由流

    http://blog.csdn.net/xiaozhang0731/article/details/8699558 1. jBPM4的特点 jBPM是JBoss众多开源项目中的一个工作流开源项目,也 ...

  10. swift-06-字符串,字符以及元组类型

    1.字符串和字符类型 //在swift中,字符串使用一对双引号括起来 var str = "hello M.SD-DJ" print(str) //字符也要用双引号括起来,用cha ...