在xcode4上安装json框架时出现的问题 [英] Issues when installing th json framework on xcode4

查看:80
本文介绍了在xcode4上安装json框架时出现的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好 我正在尝试安装json框架.根据安装说明,我必须从项目中的json-framwork/classes复制所有类!我做到了,并且出现了这个错误:

Hello I am trying to install json framework. According to installation instructions I have to copy all the classes from json-framwork/classes in my project! I did that and I am getting this error:

ld:重复符号 /Users/user/Library/Developer/Xcode/DerivedData/testhttp-eavsbuatbfoagsgbqfnevfpjxxfc/Build/Intermediates/testhttp.build/Debug-iphonesimulator/testhttp.build/Objects-Normal/i386/SB3652中的_OBJC_METACLASS _ $ _ SBJsonParser 和 /Users/用户/库/开发人员/Xcode/DerivedData/testhttp-eavsbuatbfoagsgbqfnevfpjxxfc/Build/Intermediates/testhttp.build/Debug-iphonesimulator/testhttp.build/Objects-normal/i386/SBJsonParser-46310C881BFA9776.o 对于体系结构i386 collect2:ld 返回1个退出状态命令 /开发人员/平台/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 失败,退出代码为1

ld: duplicate symbol _OBJC_METACLASS_$_SBJsonParser in /Users/user/Library/Developer/Xcode/DerivedData/testhttp-eavsbuatbfoagsgbqfnevfpjxxfc/Build/Intermediates/testhttp.build/Debug-iphonesimulator/testhttp.build/Objects-normal/i386/SBJsonParser-4254E5B76E32172.o and /Users/user/Library/Developer/Xcode/DerivedData/testhttp-eavsbuatbfoagsgbqfnevfpjxxfc/Build/Intermediates/testhttp.build/Debug-iphonesimulator/testhttp.build/Objects-normal/i386/SBJsonParser-46310C881BFA9776.o for architecture i386 collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

我在这里做错了什么?

推荐答案

请看看:

iPhone:重复的符号错误?

在右侧栏中选择项目导航器.双击您的项目(顶部元素).

Select the project navigator in the right sidebar. Double click your project(top element).

现在打开构建阶段选项卡.有一节称为编译源.打开它,检查是否有错误所指向的文件的重复项.

Now open the build phases tab. There is a section which is called Compile Sources. Open it an check if there is a duplice entry of the file which the error refers to.

我的json-framework安装

只需将这些文件添加到我的项目中

每个.m文件仅存在一次

在该类中,我需要JSON解析,我将仅导入:

In the class I need JSON parsing I'll just import:

#import "JSON.h"

这篇关于在xcode4上安装json框架时出现的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆