llvm-gcc-4.2 failed with xcode error in iphone - iphone

This may be a simple problem.
But im totally stuck with this error.
I integrated three 20 into my project.
I integrated the Sharekit also into the project and three20.
But whenever i compile the following error is showing.i can't figure this error.
Can anyone please help me this.Thanks in advace.
Error:
ld: duplicate symbol _OBJC_METACLASS_$_SHKDelicious in /Users/icodingmacmini3/Library/Developer/Xcode/DerivedData/Awesome-gqlhzchmnubhcbetpcfvbiccpdzu/Build/Products/Debug-iphoneos/libThree20UI.a(SHKDelicious.o) and /Users/icodingmacmini3/Library/Developer/Xcode/DerivedData/Awesome-gqlhzchmnubhcbetpcfvbiccpdzu/Build/Intermediates/Awesome.build/Debug-iphoneos/Awesome.build/Objects-normal/armv7/SHKDelicious.o for architecture armv7
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

When ever you get a duplicate symbol check for imports. Some kind of cycle would have happened. Try importing in .m file rather than .h file it may solve the problem.
Also make sure you have not added the file twice.

This is a linkage error. The meaning of this error is that , you have used the symbol SHKDelicious twice. Check the links below
duplicate symbol _OBJC_METACLASS_$_ClassName
http://www.dizzey.com/development/ios/duplicate-symbols-when-linking-objectivec-static-libraries/
http://www.mac-forums.com/forums/os-x-development-darwin/171821-duplicate-symbol-_objc_metaclass_.html

Related

duplicate symbol for architecture armv7 error

I'm getting following error after including an external framework and building the project with it. Don't know what to do. Only headers file of the external framework are available to me. All the implementation files (.m) are in a .exe file so I can't access them.
duplicate symbol _OBJC_CLASS_$_AppDelegate in:
/Users/u311107/Library/Developer/Xcode/DerivedData/ConsumerApp-awxafvfmhvwglmdvoobikahakarp/Build/Intermediates/ConsumerApp.build/Debug-iphoneos/ConsumerApp.build/Objects-normal/armv7/AppDelegate.o
/Users/u311107/Desktop/Stash/Mall/consumer/KMCSDK.framework/KMCSDK(AppDelegate.o)
duplicate symbol _OBJC_METACLASS_$_AppDelegate in:
/Users/u311107/Library/Developer/Xcode/DerivedData/ConsumerApp-awxafvfmhvwglmdvoobikahakarp/Build/Intermediates/ConsumerApp.build/Debug-iphoneos/ConsumerApp.build/Objects-normal/armv7/AppDelegate.o
/Users/u311107/Desktop/Stash/Mall/consumer/KMCSDK.framework/KMCSDK(AppDelegate.o)
ld: 2 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help.
Thanks.
It seems like, KMCSDK.framework has already declared an AppDelegate class, if you can not modify the source code of KMCSDK.framework and rebuild it, you should rename AppDelegate in your project to fix this problem.

Duplicate Symbol in _main

Can someone tell me why I am getting this error. I have tried cleaning and building several times . But still I am getting this error.
duplicate symbol _main in:
/Users/outthinkingindiapvtltd/Library/Developer/Xcode/DerivedData/PatternTest- axdlojadtjwkbvdioeiumrzlovix/Build/Intermediates/PatternTest.build/Debug-iphoneos/PatternTest.build/Objects-normal/armv7/main-EC3660AC7D58737D.o
/Users/outthinkingindiapvtltd/Library/Developer/Xcode/DerivedData/PatternTest-axdlojadtjwkbvdioeiumrzlovix/Build/Intermediates/PatternTest.build/Debug-iphoneos/PatternTest.build/Objects-normal/armv7/main-6C8789F4078B135A.o
ld: 1 duplicate symbol for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This means, you have a file twice in your Xcode Project. Check the Project folder, You will find a file in two different groups or folders with the same name.
It seems you have multiple entries under Targets/Compiled Sources. removed them and the problem is solved.
It might be possible you have imported an .m file instead of .h, like:
#import "DemoView.m"
Just check the extensions of the file you recently imported, after which you are getting this error.

Why show this error message "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1"

I am trying to integrate tesseract into my application. When I runs My application it's showing the bellow. If I remove tesseract file, the application is fine without errors. What might be the problem?
Error displayed is:
ld: duplicate symbol _main in /Lutful Kabir/Project/Business Card Reader/DBZiCardReader/DBZiCardReader/build_dependencies/dependencies/lib/libtesseract_all.a(svpaint.o) and /Users/foyzulkarim/Library/Developer/Xcode/DerivedData/DBZiCardReader-awawphfeoprlwqgcmoohhievukcx/Build/Intermediates/DBZiCardReader.build/Debug-iphonesimulator/DBZiCardReader.build/Objects-normal/i386/main.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
How can i remove this error message?
clang has found 2 _main symbols.
one in svpaint.o inside of libtesseract_all.a
one in your main.m file
libtesseract is either expects you to have a project that relies on their main in svpaint.o (and perhaps there are some instructions to this effect), or that it expects you not to import anything that will cause svpaint.o to have to be included as a part of the link (perhaps you are importing a libtesseract header like svpaint.h … or importing something which imports it … and which is meant only as one of their examples for using their library …)

How to add the library for OAuth

I am facing this error, what will be poosible reason for that error
ld: library not found for -lOAuth
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
thanks for any help.
if you are using twitter+oAuth then you need to drag libOAuth.a lib in your project you are missing that.
you can find libOAuth.a in your sample code folder
This Error occur when you use two file's with the same name, or you use, two same name of variable into two different .m files. So check that out.
When you miss one or more file, you will get this error. Check out for that missing file.

xcode collect2: ld returned 1 exit status - how to resolve?

From what I have read this is supposed to be when the linker (not exactly sure how that works) can't find a symbol. the symbol in question is: SCNetworkReachabilityCreateWithAddress as can be seen from the full error message below.
the thing is that the correct
framework is added to my target.
xcode recognises the symbol OK, i.e.
there is no error message in the .m
file.
the .m file is added to the correct
target so I'm not at all sure what to
do.
Any ideas please?
"SCNetworkReachabilityCreateWithAddress", referenced from:
-[AppWelcomeVC viewDidLoad] in AppWelcomeVC.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Do you have #import <Availability.h> in your AppWelcomeVC class header, or added to your precompiled header (MyApp_Prefix.pch)?
What frameworks do you have in your project?
In the past when I've had this error removing the framework and readding it fixed the problem.
Permissions problems with the framework file itself can also cause this error.