[Bug-IOS] - linker command failed with exit code 1 (use -v to see invocation)
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)的更多相关文章
- iOS linker command failed with exit code 1 (use -v to see invocation)多种解决方案汇总
有时可能会遇到这种错误,关键是这种错误,有时只有这一句话,也不会给更多错误信息. 网上找了一些,总结了如下:(PS:以下是按照解决简易程度排序,不代表出现概率) 1.bitcode问题 解决如下:原因 ...
- 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/ ...
- 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.引用出 ...
- 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 ...
- iOS出现 _OBJC_CLASS_$_ZSHomeServiceDataElementGroupLargeImage", referenced from:以及linker command failed with exit code 1 (use -v to see invocation)的错误分析
先说第一个问题 出现这样的错误我总结的原因有两个,我碰到过的: 1.文件重命名,在你创建文件的时候重名了 2.如果你是在一个类中又创建了一个或者多个类,那么你可能没有实现你写的类,也就是你只是@int ...
- Error:linker command failed with exit code 1 (use -v to see invocation) - iOS
今天在操作 CoreData 时,创建完 Create NSManagedObject Subclass... 后,工程中会自动生成四个文件,如下图所示: 此时此刻便以工程,激动人心的时刻来临了 ...
- 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 ...
- (转) error: linker command failed with exit code 1 (use -v to see invocation)
转自:http://blog.csdn.net/tiantian1980/article/details/9175777 像这样的一大堆,总体说编译链接时错误 /Users/zhangtianji ...
- symbol(s) not found for architecture x86_64 之 linker command failed with exit code 1 (use -v to see invocation)解决方案排查
这样的错误 ,我的解决方案是, 第一种: 查看他说在 ****.o 中,你要查看这样的关键点,然后去查看,你 项目中有没有引进这样的文件,在项目中查找,看项目中有没有,如果没有那就是没添加进来,你 ...
随机推荐
- CSS--滚动条设置;
CSS滚动条实现步骤及美化小技巧 1.overflow-y : 设置当对象的内容超过其指定高度时如何管理内容:overflow-x : 设置当对象的内容超过其指定宽度时如何管理内容. 参数:visib ...
- 【NOIP2010】关押罪犯
一开始看错题了,然后怎么想都想不明白--原题: S 城现有两座监狱,一共关押着 N 名罪犯,编号分别为 1~N.他们之间的关系自然也极不和谐.很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲 ...
- java的nio之:浅析I/O模型
也许很多朋友在学习NIO的时候都会感觉有点吃力,对里面的很多概念都感觉不是那么明朗.在 进入Java NIO编程之前,我们今天先来讨论一些比较基础的知识:I/O模型.下面本文先从同步和异步的概念 说起 ...
- 【计算机视觉领域】常用的 feature 提取方法,feature 提取工具包
[计算机视觉领域]常用的 feature 提取方法,feature 提取工具包 利用 VL 工具包进行各种特征的提取: VL 工具包官网地址:http://www.vlfeat.org/index.h ...
- javascript往textarea追加内容
<html> <body> <textarea id="content"></textarea> <script> va ...
- What are the main disadvantages of Java Server Faces 2.0?
http://stackoverflow.com/questions/3623911/what-are-the-main-disadvantages-of-java-server-faces-2-0/ ...
- UML 类图基础知识记录
UML类图关系(泛化 .继承.实现.依赖.关联.聚合.组合) 依赖(Dependency): 关联(Association): 聚合(Aggregation): 合成(Composition): 泛化 ...
- redis模块
http://www.cnblogs.com/melonjiang/p/5342505.html http://www.django-china.cn/topic/1054/ 1.连接方式 redis ...
- wikioi 1076 排序 【这里含冒泡、选择、插入以及快排库函数的调用】
/*=================================================================== 1076 排序 题目描述 Description 给出n和n ...
- JS动态广告浏览
<script language="JavaScript"> function addEventSimple(obj,evt,fn){ if(obj.addEventL ...