[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 中,你要查看这样的关键点,然后去查看,你 项目中有没有引进这样的文件,在项目中查找,看项目中有没有,如果没有那就是没添加进来,你 ...
随机推荐
- Codeforces Round #132 (Div. 2)
A. Bicycle Chain 统计\(\frac{b_j}{a_i}\)最大值以及个数. B. Olympic Medal \(\frac{m_{out}=\pi (r_1^2-r_2^2)hp_ ...
- linux下c语言实现计算磁盘剩余空间
#include <sys/statfs.h> unsigned ; size_t mbFreedisk = ; unsigned ; size_t mbTotalsize = ; str ...
- HDU 1507 Uncle Tom's Inherited Land*(二分图匹配)
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (J ...
- 共享内存+互斥量实现linux进程间通信 分类: Linux C/C++ 2015-03-26 17:14 67人阅读 评论(0) 收藏
一.共享内存简介 共享内存是进程间通信中高效方便的方式之一.共享内存允许两个或更多进程访问同一块内存,就如同 malloc() 函数向不同进程返回了指向同一个物理内存区域的指针,两个进程可以对一块共享 ...
- Linux常用配置文件解析
网络相关配置文件 1./etc/sysconfig/network-scripts/ifcfg-ethx 网络参数IP/子网掩码/广播地址等的配置(重启有效) 2./etc/resolv.conf ...
- MFC应用程序框架(转)
对于程序员来说,如果要提高编程效率,一个好用的,功能强大的并且可以得心应手使用的编程工具往往会给我们程序员带来莫大的方便.其实对于现在的编程工具来说,使用哪一种工具都不是问题的关键,重要的是你能够使用 ...
- C#基础:Lambda表达式
从委托的角度来看,Lambda表达式与匿名方法没有区别.在[C#基础:匿名方法]一文中,我使用了匿名方法来调用List<T>的FindAll方法.从C# 3.0开始,在使用匿名方法的地方, ...
- Oracle数据库—— 游标的创建和应用
一.涉及内容 游标的创建与应用 二.具体操作 (一)填空题 1.PL/SQL 程序块主要包含3个部分:声明部分.(执行部分 ).异常处理部分. 2.自定义异常必须使用(RAISE )语句引发. (二) ...
- linux 通用IO
open(),read(),write(),close()可以应用于管道,FIFO,socket,或者终端等所有文件类型执行IO操作. lseek()并不适用于所有类型的文件.不允许将lseek()应 ...
- linux概念之用户,组及权限
Linux 是一个多用户.多任务的操作系统:我们应该了解单用户多任务和多用户多任务的概念 单用户多任务一个beinan用户,为了完成工作,执行了几个任务:当然beinan这个用户,其它的人还能以远程登 ...