I'm getting the following two errors via xcode:
Warning: no rule to process file '$(PROJECT_DIR)/SQLite Toolbox/en.lproj/MainWindowController.m' of type file for architecture x86_64
Followed by:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MainWindowController", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
Previously my project was building just fine, but I attempted to do some localization. I had my MainWindowController.xib highlighted and choose the localize option.
After that, the project stopped compiling. It looks to me that for some reason XCode is refusing to compile my MainWindowController.m, but i'm not sure how to go about fixing that. (I have confirmed it does exist in the Build Phase Compile Source steps.
Any ideas on how I could fix this?
That sounds as if you inadvertently have localized the "MainWindowController.m" file.
The following steps worked in my test project to fix that situation:
Remove "MainWindowController.m" from your project (using the "Remove Reference" option!)
In the Finder, move "MainWindowController.m" from the "en.lproj" folder back to the main folder.
Drag "MainWindowController.m" onto the Xcode project to add it again.
Related
I already gone so many SO threads with similar issue but none of them seems to resolve my error.
In our project we have multiple "TARGETS". Only one of the target - the very first target created ever - is archiving properly. When I try to archive other target we encounter this error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_DynamicEventData", referenced from:
objc-class-ref in DataManager.o
objc-class-ref in DataReader.o
"_OBJC_CLASS_$_DynamicDataService", referenced from:
objc-class-ref in DataManager.o
"_OBJC_CLASS_$_DynamicDataConfig", referenced from:
objc-class-ref in DataManager.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I did compare the Build Setting of the working target to the other targets but all of them are equal. I checked the header files and they exists in our project directory. I tried to manually add the header files' path to Header Search Paths but same result still getting the error.
Any idea? I really need to resolve this to export an ipa file.
Thanks!
I scan manually check the Build Phases > Link Binary With Libraries of the working target vs the defected targets. I found a one framework/library that was only added to the working target the said framework isn't manage by pod that may explain why the other target doesn't have it. I think it was added manually in the project.
I add the said framework to all targets and now I can build without the said error.
Thanks!
I encountered the same problem and the solution I found is so simple (man....).
Search in the project for the classes that are mentioned in the error.
Go to the "File Inspector" and simply check V for the rest of the targets in the "Targets Membership".
That's it! It took me Two Hours (wasted time) to find out.
Hope my solution will save time for anyone with similar problem.
I just moved from manual to CocoaPods. The first thing I tried was Urban Airship. I got it all compiling but I get the following linker errors:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_UAConfig", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_UAirship", referenced from:
objc-class-ref in HomeScreenViewCtr.o
objc-class-ref in MyProfileViewController.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my pods build settings screenshot showing it's supposedly building the Urban Airship framework.
My XCode file is opened to the xcworkspace file not the xcodeproj.
Now I don't know if I'm supposed to add the Urban Airship framework my Build Phases "Link Binary With Libraries". It seems to have created a pod named after my own App, should that be in the "Link Binary With ...". What should be listed under the "Frameworks" folder and under the yellow "Pods" folder in my main file / folder navigator?
OK I figured it out. "$(inherited)" was missing from my "Framework Search Paths" of my build target. I did the "pod setup" command but it apparently forgot to set up my Framework Search Paths correctly.
Detailed answer:
Set up your Framework Search Path
Add the cocoapods framework to your Build Phases, but do NOT add that Pod_your_app_name.framework
In your main navigator: Do not attempt to add anything related to the cocoapod Framework e.g. AirshipKit to your yellow "Pods" folder, but it should appear in your yellow "Frameworks" folder.
If you really search for the inner working of CocoaPods, you'll find that your cocoa pods frameworks get built deep in your ~/Library/Developer/Xcode/DerivedData directory. Various compile variables point over that direction.
I make a build for iPhone for the first time and got a problem.
I already checked a lot of posts and didnt find answer.
When i make a build on device a get:
Undefined symbols for architecture armv7:
"RegisterAllStrippedInternalCalls()", referenced from:
RegisterAllInternalCalls() in libiPhone-lib.a(MonoICallRegistration.o)
"RegisterAllClasses()", referenced from:
InitializeEngineNoGraphics() in libiPhone-lib.a(SaveAndLoadHelper.o)
"RegisterMonoModules()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
On simulator ok.
libiPhone-lib.a added to link libraries.
Can somebody tell what it is? Please
Your unity version is not compatible, just download the latest version of unity which I believe is 4.3.1 and try recompiling. Here is the link if you need it. http://unity3d.com/unity/download/download-mac
The new version is compatible with armv7.
ok if anyone else is experiencing the same problem here's a way out:
those 3 methods mentioned are declared in the RegisterMonoModules.cpp in the Libraries folder, usually. so take that cpp file and add it to your target's Build Phases > Compile Sources
then if you have additional SDK's integrated that are not added to the 'Compile Sources' the new build will throw some other errors. just make sure to add the wrapper .mm files from the sdk's to your Compile Sources. Usually one .mm file per sdk. (e.g. for unity facebook sdk it's FbUnityInterface.mm file)
hope this helps
I dragged the Flurry.h and libFlurry.a to my project. Added the neccessary inovation in my main delgate with a correct key. I already had the SystemsConfigurations.framework in my project. When buildin I get the follow:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Flurry", referenced from:
objc-class-ref in KitzyAppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1
I have checked other build issues on Stackoverflow and nothing worked. Flurry's document is pretty lacking in details and problem solving.
Stackoverflow Lords please help!
Thanks in advance
I fixed this issue, users need to refer to the readMe .pdf with the zip file as you need to move the sdk folder with the two files into your xcode project.
Yesterday I updated new Xcode 4.5, and I got an error in my build and I am not sure how can I even fix this.
Everything works fine if I build in simulator, but when I try to build for Archive for example, i get this:
ld: warning: ignoring file /Users/corotchi/Library/Developer/Xcode/DerivedData/NJR_IR-ftjwhrqtxwedihfjrbjikbqqttkx/Build/Products/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/corotchi/Library/Developer/Xcode/DerivedData/NJR_IR-ftjwhrqtxwedihfjrbjikbqqttkx/Build/Products/Release-iphoneos/libCordova.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_CDVURLProtocol", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and more errors bellow, which are the same
Everything worked fine until u updated the Xcode, I had another issue before where I read the formums that I have to remove the "ARMV6" from the build settings, cause it is not supported anymore in new IOS, and after that I get this reference issue.
I appreciate any help,
THanks!!!!
Remove armv7s from Valid Architectures from both your project and Cordova(phonegap) project. Also set iOS Deployment target 4.3 or above in both project and Cordova(phonegap) project. After that Clean and Clean Build Folder. This will solve the problem.
If you also take out armv7s from the build settings, you should get it to build for you.
Edit: As per below: Fix can be found here via PhoneGap: https://issues.apache.org/jira/browse/CB-1360
This is a bug already fixed at Cordova 2.2.0
https://issues.apache.org/jira/browse/CB-1360
Change the Buid setting ---> Architecture ---> Build Active Architecture only ---> Yes
This solved my issue for using old cordova versions in new Xcode 5