I've recently upgraded to Xcode 4.4 and have been using it for some Mac App Store submissions. Two worked fine but the third gave this error:
Undefined symbols for architecture x86_64:
"_objc_retain", referenced from:
___ARCLite__load in libarclite_macosx.a(arclite.o)
(maybe you meant: _objc_retainedObject)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ARC is turned off so I don't know where this reference is coming from, or how to get rid of it. I've tried the usual clean/build cycle but to no avail.
Any thoughts?
I think you should use the SDK 10.6 on Xcode 4.4,right?
If so, please Change "Implicitly Link Objective-C Runtime Support" to "NO".
Is your base sdk lower than 5.0? I'm using Xcode4.5, and get the same error when i building with iOS 4.2.After I changed it to iOS5.0(or above), the error disappeared.
I'm sorry,you talked about Mac app.But i think the reason may be the same.
OK,i found an answer: Change "Implicitly Link Objective-C Runtime Support" to NO may work.
I had the same problem in Xcode 7.0.1 with iOS 7.0. The solution was to change the Deployment Target from 7.0 to 7.1.
Related
When building our macOS application on Sierra (10.12.6) with Xcode 9 (9A235), the application will not launch properly because of the ColorSync framework -- this can't be located by dyld:
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
Referenced from: /Volumes/*/ColorSyncTest.app/Contents/MacOS/ColorSyncTest
Reason: image not found
Given that ColorSync.framework in the 10.13 SDK resides directly at /System/Library/Frameworks, instead of being a child of ApplicationServices.framework as it used to be, the error makes sense...
We've tried linking explicitly (both strongly and weakly) to both ColorSync and ApplicationServices -- to no avail.
The question is -- how are people using ColorSync in Xcode 9 on anything earlier than 10.13?
Any ideas would be very much appreciated.
Thanks,
D.
We've managed to fix the issue by changing the deployment target for the dynamic library which uses ColorSync - from 10.8 to 10.9. I don't know why this works exactly, if someone else does, please share.
The first place to look for answers to these sorts of problems are the Mac OS X Release Notes. You can also check the API Changes page.
It looks like you are building against the 10.13 SDK and running on 10.12, can you change your target [macOS Deployment Target] to 10.12 and see if the linkage clears up?
I'm suddenly getting errors and warnings in a build that was working fine a few weeks ago - I went on holiday, came back, no workie. The only one of concern is this error:
ld: warning: ignoring file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a, missing required architecture x86_64 in file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a (4 slices)
Either the error string is wrong and it's actually looking for some other architecture, or I'm very confused as to what it's trying to do. Why would an iOS app be looking for a x86_64 arch? Is this something to do with the simulator? If so, why didn't I get this error two weeks ago?
I'm building for iOS7 on XCode5/MacOS10.9.x
If you upgraded Xcode to 5.1, you are getting that because the default architectures for your build now include 64-bit, but your library doesn't support it, so it can't link.
You can override the default by setting Architectures (ARCHS) in your build settings to something else, probably $(ARCHS_STANDARD_32_BIT)
Something like this:
ld: warning: ignoring file
/Users/srm-mac10/Downloads/ICodeBlogStaticLibrarySample/MathTest/Classes/iCodeBlogsMathLibrary/libICodeMathUtils.a,
missing required architecture i386 in file Undefined symbols for
architecture i386: "_OBJC_CLASS_$_MathFunctions", referenced from:
objc-class-ref in MathTestAppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
Following error coming while i am trying to make a static library in objective C. Any idea ??
Please help me.
The iOS simulator runs natively on the system's CPU, which is an x86 architecture. Hence your code needs to be built for x86 (which is presumably working already) and any libraries you link to also need to be built for x86.
If this is a static library that someone else has supplied to you (perhaps you purchased it?) then you will need to request the x86 version as well and link against that.
If you are building the static library yourself, check the build settings for that project (I'm assuming it's a separate project) and make sure it's configured to be compilable for the simulator. Then explicitly build the library for the simulator.
(I've run into some weird issues with static libraries where Xcode 4.x fails to automatically build the correct library architecture, necessitating an explicit manual build.)
I think you have to set the flag "-all_load" in the "other linker flags" in your project build settings
How to add the framework iHasApp.a framework into my Application bundle framework or framework.I tried to add through bundle phases and add files, but still i am getting the following errors.
Undefined symbols for architecture i386:
_OBJC_CLASS_$_iHasApp, referenced from:
objc-class-ref in RootViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And I am not able to add this framework.
Author of iHasApp here. From your description, you are using the static library from http://amitay.us/ihasapp/index.php
As Armaan asked, are you trying to run it on the Simulator? As per the warning on the website, iHasApp was not compiled to run on the Simulator. The warning you are receiving indicates that symbols are not being found for the i386 architecture, namely the iOS Simulator.
You will only be able to compile that project on an actual device.
The following is not meant as an advertisement: iHasApp is now being maintained as a new, more comprehensive software as a service at https://www.iHasApp.com. It is currently in the late stages of beta. If you would like to participate, then sign up for an account and email me at daniel#ihasapp.com. This newer framework will run on the Simulator (although it is somewhat pointless).
I have an issue with xCode 4.2. I am getting this error when building:
2011-06-18 13:35:49.839 Validation[4110:607] *** Warning: Defaulting to the standard codesign tool
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
I had a look at my project settings, and it has :
architectures: Standard (arm7) - ${ARCHS_STANDARD_32_BIT)
Build active architecture only : NO
Not sure what
For some reason the default architecture settings with xCode 4.2 is only for armv7.
Go to Target -> Build Settings -> Architectures -> Release
on value dropdown pick "Other...",
remove $(ARCHS_STANDARD_32_BIT), and add 2 rows
first with "armv6" and second "armv7"
Done
For Xcode 4.5, set the deployment target to at least iOS 4.3 and that will resolve it. Earlier versions of iOS are almost extinct.
Not the optimal solution, but I found that if I changed the Deployment Target to 4.3 (it was 4.0 before) it gets rid of the error.
For XCode 4.5
Had to set "Deployment Target" to 4.3, "Architectures" to armv6 armv7 armv7s as described above, AND "Build Active Architectures Only" to No.
This on a project that worked fine for several month before upgrading to XCode 4.5.
Note: Set the iOS Deployment Target to 4.3 or later in your project if you wish to drop ARM v6 support for your application. An ARM v7 processor is required to run versions of iOS later than 4.2.1.
My previous answer was deleted by the moderator because I didn't comply with their rules. So, answering again.
I faced the same issue and wasted 2 days on it. In my case an upgrade to XCode caused it. I downgraded XCode to the previous version and it got fixed for me. If this is your issue then uninstall new version, reboot and then install old version again. That should do it for you.
I have also added some screenshots and info to my blog about this issue here: http://iostipsntricks.wordpress.com/2011/06/24/solved-application-executable-is-missing-a-required-architecture-at-least-one-of-the-following-architectures-must-be-present-armv6/
Had absolutely the same problem with Xcode Version 4.2. and got also an other error:
There is no codesign:wrapper executable. Please reinstall the Xcode developer tools.
After downgrading the Xcode to an older version it fixed the problem.
Check this post, it is the right one with just adjust a setting in Xcode 4.2, just set "Build Active Architecture only" to NO:
iTunes Connect application is missing required architecture
My Answer may be solve your problem:
I had this problem even after following the accepted answer and found the following to work:
In your Info.plist, add an entry for Required Device Capabilities. This should be an array and will have two entries.
Item 0 : armv6
Item 1 : armv7
It will look like this:
Required device capabilities entry
Had the same problem, tried everything mentioned here - but still got the error on validate -
I tried armv6 and armv7 steps, tried to add that to info.plist and also tried regenerating the distribution certificate just in case.
Turns out the info.plist file must have ${EXECUTABLE_NAME} and ${PRODUCT_NAME} in the respective fields
ALSO the Product name in the Build Settings for that scheme+Target SHOULD match the scheme name
I made sure all the names matched exactly
EXECUTABLE_NAME, PRODUCT_NAME, Product Name in Target, binary name in build settings and info plist, and the deployable binary name - made sure they matched the Target name itself
Once all the names matched and the architecture matched, it worked. Until then it kept giving me error on validation.