I am patching upp an application from iOS 4.2 to 4.3 using new xcode4.
With no changes made, except setting iOS to 4.3, I created entitlements and go!
Message I get is:
Undefined symbols for architecture armv6:"function", referenced from:
Ive tried to Clean the project, reinstalling xcode.
I uninstalled also the xcode4 demo version.
I also tried to set to Optimized armv7.
I would be very happy for some help, I'm stuck. Really.
Thanks very much in advance!
Here's how I got this problem:
I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.
My solution for this problem:
Click on the Project icon
Go to the Target in the navigator menu
Click on the "Build Phases" tab
Add the .m file to "Compile Sources" (either drag it across, or use the + button)
Add the .xib or Storyboard file to "Copy bundle resources"
Clean and build
For this type of error, this is what I typically see:
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_MyCustomController", referenced from:
objc-class-ref in SomeOtherController.o
ld: symbol(s) not found for architecture armv6
Almost every time I see this error it is caused by hidden/invisible characters in the import statement in SomeOtherController.h or SomeOtherController.m. So, look at both your .h and .m file, find the line that looks like this:
#import "MyCustomController.h"
Delete this line and retype it (do not copy/paste it -- you'll just repaste the offending hidden character).
Click on your Project name in the navigation window, choose the target you're building against, go to build phases, make sure the one Xcode's telling you that's missing is in there.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Release' option to 'Yes'.
This solved my problem - I hope it helps you, too! :)
I had this problem and I have just solved it.
It was a simple typo in the function name (forgot one letter) that caused the problem in my case.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Debug ' option to 'architecure arm7 arms7s'.
This solved my problem - I hope it helps you, too! :)
I had a similar issue popping-up all suddenly - more specifically, I was getting Undefined symbols for architecture armv6: "_OBJC_CLASS_$_CLLocationManager", referenced from: objc-class-ref in MyCLController.o
Note that I had CoreLocation.framework listed in my frameworks (in xcode' Project left nav, under the Frameworks folder); and had previously geolocation working just fine.
I got rid of the issue by re-installing CoreLocation.framework.
If you're not sure how to do that in xcode:
* click on your project in xcode left nav bar
* Go in the General tab of your project settings
* Navigate down - you'll see the list of frameworks installed under Linked Frameworks and Libraries
* Click on the + icon to add the CoreLocation.framework
In my case, I was doing this in a viewcontroller.m
#import <MediaPlayer/MediaPlayer.h>
Without doing Link Binary With Libraries with MediaPlayer.framework. After adding it, it compiled fine
Related
I'm totally novice as programmer. I'm trying out the Swift and Parse. After I had added Parse.framework and Bolts.framework and all the dependencies I got SourceKitService crashed. I tried #include instead #import but it didn't work for me. iPhone Simulator failed as well. The problem is solved only if I delete the #import .
Help me please to solve the problem. Thank you in advance!
This sounds like you did not include the framework itself. Add the framework to your project.
In the project navigator, select your project
Select your target
Select the 'Build Phases' tab
Open 'Link Binaries With Libraries' expander
Click the '+' button
Select your framework
(optional) Drag and drop the added framework to the 'Frameworks' group
Note: from How to "add existing frameworks" in Xcode 4?
I am trying to integrate dejalactivityview indicator view in my application, and I am running into this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_DejalActivityView", referenced from:
objc-class-ref in WelcomeMessage.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This library is pretty easy to integrate and I am pretty sure I did everything correctly: added the .m and .h files, my project is ARC enabled and thats how I call the method:
[DejalActivityView activityViewForView:self.view];
Pretty simple, no? Still doesn't work...thanks for the help!
UPDATE:
I tried this:
DejalActivityView *testvc;
[testvc activityViewForView:self.view];
But I am getting an error (before compiling) that "no visible #interface for "DejalActivityView" declares selector 'activityViewForView:self.view'"
OK, I got the same thing just now. It seems if you simply drag the .m and .h files into your project, the .m file won't be added as source to link to your project, hence the link errors. What solved this for me was adding the DejalActivityView.m source file into the "Compile Sources" section under "Build Phases" of the project target. In other words, go to the Project Navigator and click on the uppermost item, then select the "Build Phases" tab, and then add the .m file to the "Compile Sources" section. Build and run your project again, and this time it should not have the linker errors!
what's your class name? make sure u spell correctly if again not work then change the class name. cz it some times that your class name matches with some built in name or some method name in project already in use
Check if you have actually copied the .m and .h files or you are just referencing them. Compiler might not be able to compile these files if you have not copied them to your project folder.
check this for
"no visible #interface for "DejalActivityView" declares selector 'activityViewForView:self.view'"
reply:- No need for a property for the DejalActivityView
please import this file in your viewcontroller .m
#import "DejalActivityView.h"
and write this code in viewdidload and check
[DejalActivityView activityViewForView:self.view];
if you have any error after that implement the download this from this link and implement , i use and work my code
I'm attempting to upload my first app to the app store using xcode 4.3, but can't get past this error... "application executable is missing a required architecture. At least one of the following architectures must be present: armv7" I looked up the issue. Their are several post on stackoverflow addressing the issue, but none of the suggestions listed worked. I attempted to add armv6 and armv7 to the build settings, but the errors still persist. Any suggestions would be welcomed. Thanks.
screen shot here..
http://dl.dropbox.com/u/2813968/Build%20Settings.png
For Xcode 4.5 at least, set the deployment target to at least iOS 4.3 and that will resolve it. Earlier versions of iOS and armv6 are almost extinct.
Make sure that these settings match your Target and not just your Project settings.
1) Left-click project icon (blue icon, under "Run" button).
2) Next to the project icon (to the right of it), left-click on project name under "PROJECT" (White background).
3)Select tab "Build Settings" and look for tab "Build Active Architecture Only" -----change to -----no
As soon as I add the MediaPlayer.framework into a new program, XCode absolutely shits its pants. Under supporting Files, PROJECTNAME-Prefix.phc starts red-flagging both #import and #import
Why is it doing this? I have tried to create a new project and re-adding the Framework, but even if that is all I have done, it gives 4 errors on the first failed build.
if you are using xcode4 don't slide the framework in the project: it edit the framework search path and do the error you describe.
Try deleting the framework search path in project "build setting" and for adding the framework use "target" "build phase" "link binary with library".
hope it help and sorry for my poor english.
recently I've been given a project which need to display a spherical panorama view. Normally on iphone i've been using panoramaGL for some time but for ipad, i dont have any luck to use it any more.
I can compile the lib with some minor warnings. but when i try to link the lib to my real project, it just keep telling me that PLTexture is not there. it says
Undefined symbols:
"_OBJC_CLASS_$_PLTexture", referenced from:
objc-class-ref-to-PLTexture in panoTestViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Please anybody can help me out of this?
I had the same problem, and noticed that although I included PanoramaGL xcode project, its lib (libPanoramaGL.a) was not selected to build with the target (that little checkbox in the top right list of XCode).
Once I selected the checkbox, the problem went away, but the bulider was stuck on a similar error with PLResources as the current trouble maker. But this might be only my problem, cause I went to the PanoramaGL project, and noticed that PLResources.c and .h were not included in the project.
Once I included them and rebuilt everything - the build succeeded.
Hope this helps,
Oded.