Ld /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Products/Debug/OC_Language normal x86_64

cd /Users/Rubert/IOS/iworkspace/OC_Language

export MACOSX_DEPLOYMENT_TARGET=10.10

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Products/Debug -F/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Products/Debug -filelist /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/OC_Language.LinkFileList -mmacosx-version-min=10.10 -fobjc-arc -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/OC_Language_dependency_info.dat -o /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Products/Debug/OC_Language

duplicate symbol _OBJC_CLASS_$_Student in:

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/main.o

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/Student.o

duplicate symbol _OBJC_METACLASS_$_Student in:

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/main.o

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/Student.o

duplicate symbol _OBJC_IVAR_$_Student.s in:

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/main.o

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/Student.o

duplicate symbol _OBJC_IVAR_$_Student.age in:

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/main.o

/Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/Intermediates/OC_Language.build/Debug/OC_Language.build/Objects-normal/x86_64/Student.o

ld: 4 duplicate symbols for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

该问题主要是因为引用的头文件不对。

 #import <Foundation/Foundation.h>
#import "Student.m" int main(int argc, const char * argv[]) {
@autoreleasepool {
//
//
////1.基本类型()
//NSLog(@"Hello, World!");
//DataTypes_Clazz *stu = [[DataTypes_Clazz alloc] init];
//[stu release];
//2.基本语法 //创建方式1
Student *sPo = [Student alloc];
sPo = [sPo init];
[sPo setAge:()];
NSLog(@"sPo.Age:%d",[sPo getAge]); //创建方式2
Student *sPo2 = [[Student alloc] init];
[sPo2 setAge:()];//设置值
NSLog(@"sPo2.Age:%d",[sPo2 getAge]); //创建方式3
//NSString *ns = [[NSString alloc] init];
NSString *ns2 = @""; Student *sPo3 = [[Student alloc] initWithAge:() s:(ns2)];
[sPo3 setAge:()];//设置值
NSLog(@"sPo3.Age:%d",[sPo3 getAge]);
NSLog(@"sPo3.S:%p",[sPo3 getS]); } return ;
}
应该是#import "Student.h",一不小心就犯了这个种低级错误。

[Bug-IOS] - linker command failed with exit code 1 (use -v to see invocation)的更多相关文章

  1. iOS linker command failed with exit code 1 (use -v to see invocation)多种解决方案汇总

    有时可能会遇到这种错误,关键是这种错误,有时只有这一句话,也不会给更多错误信息. 网上找了一些,总结了如下:(PS:以下是按照解决简易程度排序,不代表出现概率) 1.bitcode问题 解决如下:原因 ...

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

    Ld /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/ ...

  3. 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.引用出 ...

  4. iOS报错:linker command failed with exit code 1 (use -v to see invocation) 问题解决方式之一

    百度库原版本:3.2.1  更新为:4.2.0,两个库相隔2年时间: 问题i: 更新CocoaPods的同时更新了百度地图库的版本,运行程序报错: linker command failed with ...

  5. iOS出现 _OBJC_CLASS_$_ZSHomeServiceDataElementGroupLargeImage", referenced from:以及linker command failed with exit code 1 (use -v to see invocation)的错误分析

    先说第一个问题 出现这样的错误我总结的原因有两个,我碰到过的: 1.文件重命名,在你创建文件的时候重名了 2.如果你是在一个类中又创建了一个或者多个类,那么你可能没有实现你写的类,也就是你只是@int ...

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

    今天在操作 CoreData 时,创建完 Create NSManagedObject Subclass...  后,工程中会自动生成四个文件,如下图所示:   此时此刻便以工程,激动人心的时刻来临了 ...

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

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

    转自:http://blog.csdn.net/tiantian1980/article/details/9175777   像这样的一大堆,总体说编译链接时错误 /Users/zhangtianji ...

  9. symbol(s) not found for architecture x86_64 之 linker command failed with exit code 1 (use -v to see invocation)解决方案排查

    这样的错误 ,我的解决方案是, 第一种:   查看他说在 ****.o 中,你要查看这样的关键点,然后去查看,你 项目中有没有引进这样的文件,在项目中查找,看项目中有没有,如果没有那就是没添加进来,你 ...

随机推荐

  1. UVa 489 刽子手游戏

    游戏规则,计算机想一个单词让你猜,你每次可以猜一个字母,如果单词里有那个字母,所有该字母都会显示出来,如果没有那个字母则计算机会在一副"刽子手"画上填一笔,这幅画一共需要7笔就能完 ...

  2. HDU-4747 Mex(线段树区间更新)

    题目大意:给一个长度为n的整数序列,定义mex(i,j)表示区间[i,j]中没有出现过的最小非负整数,求sigma(mex(i,j)),即序列中所有连续非空子区间的mex之和. 题目分析: answe ...

  3. Hardly Hard

    You have been given the task of cutting out a quadrilateral slice of cake out of a larger, rectangul ...

  4. ARM1138@库函数速查

    1. GPIO库函数 可实现的功能: 获得/设置指定管脚的方向(输入.输出)和模式(硬件控制) 获取/设置指定管脚的配置(驱动强度2/4/8/8_SCmA.管脚模式:推挽(弱上拉/弱下拉)/开漏(弱上 ...

  5. ps命令详解(转)

    原文地址:http://apps.hi.baidu.com/share/detail/32573968 有时候系统管理员可能只关心现在系统中运行着哪些程序,而不想知道有哪些进程在运行.由于一个应用程序 ...

  6. js获取客户端操作系统

    function detectOS() { var sUserAgent = navigator.userAgent; var isWin = (navigator.platform == " ...

  7. stl迭代器原理

    具体实现肯定不如书上讲的清楚了,这里只是根据侯捷书上的讲解,自己建立一条思路以及形成一些相关的概念 迭代器也可被称作智能指针,用于遍历容器内的元素,stl每个容器都实现了自己的iterator,ite ...

  8. Using SHOW PROCESSLIST and mysqladmin debug Output in Conjunction with SHOW INNODB STATUS

    When InnoDB appears hung, I know the natural reaction is to check SHOW ENGINE INNODB STATUS. In fact ...

  9. SQL 显示所有表所占存储空间

    USE master SELECT dbname = DB_NAME(), name, , , , /reserved END), , , [记录数] = rowcounts FROM ( SELEC ...

  10. Google将数十亿行代码储存在单一的源码库

    过去16年,Google使用一个中心化源码控制系统去管理一个日益庞大的单一共享源码库.它的代码库包含了约10亿个文件(有重复文件和分支)和 3500万行注解,86TB数据,900万唯一源文件中含有大约 ...