今天添加了一个新类(包括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. "_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 ...

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

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

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

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

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

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

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

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

  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. 每日英语:China Grapples With Genetically Modified Foods

    A Chinese agricultural official's unsupported claims about the carcinogenic risks of consuming genet ...

  2. 运用 Range 对象处理 Word 文档内容

    运用 Range 对象处理 Word 文档内容   在所有 Office 应用程序中,Microsoft Word 可能是应用最广泛的应用程序,它还经常在自定义 Office 解决方案中扮演重要的角色 ...

  3. oracle存储过程函数

    1.函数 create or replace function get_Destroy_no return varchar2 is Result varchar2(50);begin SELECT m ...

  4. Linux 新增一个用户命令 adduser

    这几天新增用户老是会用 useradd , 这条命令比较复杂,记录 adduser 这条超级简单的命令. Full name 最后和用户差不多,不然登录的时候不好辨别 附: 新增用户无法 sudo 请 ...

  5. gpio 灯的对应关系

    1 点灯验证通过:   GPIO160     TX1-LED GPIO161     RX1-LED   GPIO163     TX2-LED GPIO164     RX2-LED   GPIO ...

  6. httpoxy 漏洞预警及修复方案

    影响范围 PHP.Go.Python等开启CGI(Client)模式的脚本语言 Language 环境依赖 HTTP Client PHP php-fpmmod_php Guzzle 4+Artax ...

  7. Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function问题解决

    selenium 目录下的lib文件夹下的所有包都加到类库里

  8. 【cf489】D. Unbearable Controversy of Being(暴力)

    http://codeforces.com/contest/489/problem/D 很显然,我们只需要找对于每个点能到达的深度为3的点的路径的数量,那么对于一个深度为3的点,如果有a种方式到达,那 ...

  9. zara

    [1]ZARA是西班牙Inditex集团旗下的一个子公司,它既是服装品牌,也是专营ZARA品牌服装的连锁零售品牌.1975年设立于西班牙的ZARA,隶属于Inditex集团,为全球排名第三.西班牙排名 ...

  10. 查看SQLServer数据库每个表占用的空间大小

    创建存储过程: CREATE PROCEDURE [dbo].[sys_viewTableSpace] AS BEGIN SET NOCOUNT ON; CREATE TABLE [dbo].#tab ...