Problems installing json framework on xcode4

Hi, I am trying to install the json framework. According to the installation instructions, I need to copy all the classes from json-framwork / classes to my project! I did this and I get this error:

ld: duplicate character _OBJC_METACLASS _ $ _ SBJsonParser in / Users / user / Library / Developer / Xcode / DerivedData / testhttp -eavsbuatbfoagsgbqfnevfpjxxfc / Build / Intermediates / testhttp.build / Debug-iphonesimulator / testhpbspertspsperlspjspbpservicepjspjs normal -4254E5B76E32172.o as well as / Users / user / Library / Developer / Xcode / DerivedData / testhttp -eavsbuatbfoagsgbqfnevfpjxxfc / Build / Intermediates / testhttp.build / Debug-iphonesimulator / testhttp.build / Objects-469776FBI886BIFBI883BIFA116 / normal 1 exit command returned for i386 collect2: ld architecture Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

What am I doing wrong here?

+1
source share
2 answers

Please take a look at:

iPhone: repeated character error?

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

Now open the assembly phase tab. There is a section called Compile Sources. Open it, check if there is a duplicate file to which the error belongs.

My json-framework installation

Just added these files to my project

enter image description here

Each .m file here only once

enter image description here

In the class, I need JSON analysis, which I just import:

#import "JSON.h" 
+5
source

I just delete the .m and .h files from the JSON Framework with which the compiler gave me errors, in the end I just stick with the JSON Framework: NSObject + SBJSON, NSSTring + SBJSON.h and m. This worked for me, hope this helps: D

0
source

Source: https://habr.com/ru/post/1369127/


All Articles