i am getting this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIHTTPRequest", referenced from:
objc-class-ref in FirstViewController.o
"_OBJC_CLASS_$_SBJsonParser", referenced from:
objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note i have added the frameworks core graphics,system configuration,mobile core services,libz.dylib,libz.1.2.5.dylib,CF Network,UI Kit and Foundation. I have searched all the forums and spend almost 4 days but just don't find the cause.
When i comment my ASIHTTPRequest and SBJSON code lines,it works fine. I have added all the classes for ASIHTTPRequest and SBJSON and checked thrice. Could anyone suggest what am i doing wrong?
I would take a look at the Build Phases section in your Target. Under "Compile Sources", make sure you see the .m files for ASIHTTPRequest and for SBJson. Sometimes when you drag external classes into a project, even if you check the box to copy the files into your project, they don't make it into these compile sources. When you drag a file into Xcode, there is a check box to add the file to the target. If this isn't checked, the file won't make it into the Compile Sources. Delete the files and re-add them, ensuring this file is checked (or you can add the .m files manually if you'd like).
For ASIHTTP Request add the following frameworks:
If you are using ASIHttp classes in iOS 5 or later, you need to turn ARC off for the ASIHttpRequest
classes in Project-> Build Phases -> Compile Sources by using -fno-objc-arc
for the ASI API classes.
Hope it solves the problem.
i had this same problem , but when i included the following frame-work
its working fine now..Don't forget to include -fno-objc-arc in the compile source
Best Wishes.......
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With