recieved apple O Linker Error when adding ASIHTTPRequest - iphone

this has made me crazy today, I use ASIHTTPRequest, http://allseeing-i.com/ , already, but here, am trying now to add it to an app, once added it gave me this crazy error.
I have started a new fresh project, and commented all related code, added the code without it, and yes, it works, added it, and it's libraries and no it doesn't work and I got this crazy Error, I'm stuck and need help.
BTW, this is the detailed error,
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libz.1.2.3.dylib, missing required architecture i386 in file
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file 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
Thank you,
Regards,
Ahmed

I got the answer now.
I have copied the older version, a working version of my app. Or just create a new project and add the files that are not related to this, and make sure it's working and building.
Then, Added the frameworks from project setting (first icon on left) and then added from the build phase the correct libraries.
My problem was : I was trying to add the libraries by dragging them into my project, and the problem was specially for this one. libz.1.2.3.dylib. Thank you anyways, hope this is helpful for someone.

Related

Xcode Build Failure on Archive, but not on Run with ResearchKit

I'm trying to build a project that has ResearchKit in it, and whenever I build and run on a physical device (or the simulator, for that matter) it works fine. But when I attempt to Archive it, I get the following error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKVisualConsentStep", referenced from:
objc-class-ref in InformedConsent.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed the installation guidelines on the ResearchKit GitHub, and made sure to check that researchKit.framework was under the Frameworks, Libraries and Embedded Content section as well as the "Link Binary With Libraries" section of the build phases tab (as was described in this link as well as a couple others: Xcode build failure "Undefined symbols for architecture x86_64") but still nothing.
Is there something I'm doing wrong, or another setting I might be able to change?
UPDATE:
I noticed that the element that was throwing the error - ORKVisualConsentStep - was deprecated a few iOS versions ago. So by taking that out, I was able to get the project to archive.
I didn't want to put this as the accepted answer, though, because I wanted to see if there was a better solution than just deleting code.
Thanks for your help!

Linker command failed with exit code architecture i386 xcode

I have an app that I am using various other Frameworks and libraries in.
FacebookSDK, GoogleSignIn, libsqlite3
I have included these in my buildSettings and even put Facebook in my Frameworks path and libxml2 in the Header Search Path.
However when I build in the simulator I get 21 errors which say
"linker command failed with exit code 1
ld: symbol(s) not found for architecture i386
this only happens with the simulator not on any device.
I am attaching a screen shot.
Any ideas would help. I have look at a lot of questions with this with no solution.
The lines in yellow are telling you the problem. When you compile for the simulator you are producing i386 code, for a real device you are producing ARM code. The libraries you are using do not contain i386 code, hence the errors.
You need to obtain versions of the libraries with i386 code.
HTH

Undefined symbols for architecture armv7 in xcode

I am stuck into errors when using codeTimestamp classes to checkout speed of my code.
But these classes are working on any other project. I don't know what happen to this.
Errors are:
Undefined symbols for architecture armv7:
"__Z25LogTimestampChunkInMethodPKciaa", referenced from:
-[EAGLView renderFrameQCAR] in EAGLView.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks in advance for help, have a great day.
You know you have to set the -fno-obj-arc flag on that file, right?
Look in your EAGLView source file, and find where you use LogTimestampStartChunk. Is that the only file you added LogTimestampStartChunk to? If so then for whatever reason, the CodeTimeStamp.o is not being added to your Target. If you do have the LogTimestampStartChunk used in other files, comment it out of EAGLView and see if you can get it to build.
Ultimately, if you cannot use this macro in even one file and get the project to build, then you never included the CodeTimeStamp.o file. If you can get it to build otherwise, then its something about EAGLView.

error while loading project into device..about libsqlite3.0dylib file is missing

I am developimg an app. In the middle of my project suddenly the libsqlite3.0dylib file turned into red color. When I was trying to load the project into simulator it was running and into device it was showing the rolling error.
I removed the red color file and freshly added the libsqlite3.0dylib file. Then also it showing error. I have seen many more forums and did not get the right choice to proceed with my app.
What might cause this and how do I solve it?
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/libsqlite3.0.dylib, missing required architecture i386 in file
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file for architecture i386
In your Target's Build Settings, remove everything in Framework Search Paths. This should fix your issue.
Hope this helps !
P.S: This is an issue that has been on SO before. You can see solutions here, Build Error - missing required architecture i386 in file .
Since you fail to understand how to solve the issue, I will also attach a photo on how your Framework Search Paths should look. Empty.

Error is occuring during implementation of MGTwitterengine

ld: warning: directory not found for option '-L/Users/MYcomputer002/Documents/MGTwitterEngineTest/yajl/build/yajl-1.0.7/lib'
ld: framework not found Cocoa
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
I am implementing MGTwitterEngine in my project. After large modification and removing an error I stuck with the above error. What about this exact error?
MGTwitterEngine references but doesn't contain yajl. You have to add it yourself. You can download and copy the files manually or add it as a framework following the instructions at the yajl page.
If you dig around in the MGTwitterEngine you'll see the yajl files in red, that means they are missing. You'll find the same problem with OAuthConsumer and TouchJSON.