I have this message from Xcode
Ld /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp normal armv7
cd /Users/myUsername/Documents/_IPAD/myApp
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Products/Debug-iphoneos -F/Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Products/Debug-iphoneos -filelist /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -framework AudioToolbox -framework SystemConfiguration -framework QuartzCore -framework OpenAL -framework CoreGraphics -framework CFNetwork -framework MessageUI -framework CoreData -framework AVFoundation -framework StoreKit -framework UIKit -framework Foundation -o /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ViewController", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What exactly is not found? If it is saying that something was not found where is this not found stuff being looked for? Or in other words, if xcode is searching for something it is searching somewhere, where and what?
The ViewController object is not found and it was referenced within AppDelegate. You do not link ViewController into your app. Check if your Compile Sources section within the Build Phases of your project shows ViewController.m.
I just ran into this. Turns out I didn't add the new source to all of the targets that needed it. Maybe this will help someone in the future.. :)
I got same error after updating xCode 6beta to xCode 6.0.1. After spending a lot of time I fixed it by deleting "Derived Data" from Window -> Organizer -> Projects -> #Select project# and pressed Delete in the "Derived Data".
Related
I'm using libpd in a universal iOS app, working with iOS 7 and Xcode 5.0.2. libpd works as expected (can load and interact with Pd patches), but I'm having trouble using external objects.
Here's the error message I'm seeing:
Ld DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts normal armv7s
cd /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts
setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos
-F/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos -filelist /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts.LinkFileList
-dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework GLKit -framework OpenGLES -framework SystemConfiguration -framework Security -framework QuartzCore -framework CoreText /Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/libpd-ios.a
-framework AudioToolbox -framework AVFoundation -framework CoreBluetooth -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Intermediates/BrightHearts.build/Debug-iphoneos/BrightHearts.build/Objects-normal/armv7s/BrightHearts_dependency_info.dat -o
/Users/jman/Developer/Sensorium/brighthearts-beta/BrightHearts/DerivedData/Build/Products/Debug-iphoneos/BrightHearts.app/BrightHearts
Undefined symbols for architecture armv7s:
"_allsickles_setup", referenced from:
-[SENViewController setupPD] in SENViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've seen the suggestion to set the 'Build Active Architecture' flag to YES for the libpd subproject - this doesn't make any difference, I still get the same error.
Is there a solution (obvious or otherwise) for this issue?
looks to me like you aren't actually compiling allsickles.c from the Cyclone external. That file has the method void allsickles_setup(void) which I guess you're trying to call to set up libpd.
If allsickles.c is in your project, maybe it's not actually getting compiled, so you might have to add it to "Compile Sources" under Build Phases.
I'm having a problem getting my PhoneGap 3.2.0 app to compile on Mac when the Zbar barcode scanner plugin is implemented. It will compile within XCode if I deploy to the device, but to a simulated device, it gives the error:
Ld
DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP
normal i386
cd /Users/Cordova/MyApp/platforms/ios
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
-L/Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator
-L/Users/Cordova/MyApp/platforms/ios/ZBarSDK -L/Users/Cordova/MyApp/platforms/ios/MYAPP/Plugins/com.manateeworks.barcodescanner/MWBarcodeScanner
-F/Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator
-filelist /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Intermediates/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load
/Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/libCordova.a
-ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework AssetsLibrary -framework CoreGraphics -framework MobileCoreServices -framework CoreLocation
-weak_framework ImageIO -framework CoreMotion -weak_framework AudioToolbox -weak_framework SystemConfiguration -framework Foundation
-framework UIKit -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework QuartzCore -liconv -lzbar -Xlinker -dependency_info -Xlinker /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Intermediates/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP_dependency_info.dat
-o /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP
ld: warning: ignoring file
/Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a, missing
required architecture i386 in file
/Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a (3
slices) Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in ZbarcodeScanner.o "_ZBarReaderControllerResults", referenced from:
-[ZbarcodeScanner imagePickerController:didFinishPickingMediaWithInfo:] in
ZbarcodeScanner.o ld: symbol(s) not found for architecture i386 clang:
error: linker command failed with exit code 1 (use -v to see
invocation)
While I don't actually want or need the simulated devices; the problem is that from the terminal, when I run the command:
$ cordova build ios
it throws up the error:
Error: An error occurred while building the ios project.
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/MyApp.app/MyApp normal i386
(1 failure)
If I try to type the command shown in the error on its own, it tells me:
ld: file not found: build/emulator/MyApp.app/MyApp
Which is true. It doesn't exist. I presume that something else is failing before this and stopping it from getting created.
If I remove Zbar all together, it everything works fine.
A previous version of the app I had made was way back at PhoneGap v2.5.0 and wasn't using the command-line-interface to create the build. I had put it all together manually, so it wasn't giving me this issue.
I've tried a lot of things already in the Build Settings / Build Phases sections. I've been at this for 2 weeks now, and it seems that everything I try just leads to new error messages. Please help!
I solved this! I downgraded the version of ZBar to the pervious version and it worked right away. I had some version in my project that apparently had ios7 fixes. Not sure what the exact cause of the issue was in the end mind you.
I'm trying to use the Google Plus SDK for sharing in an iOS 6.1 app and get a linker error after adding the GooglePlus.framework and the GoogleOpenSource.framework.
Merely including the frameworks and building yields the following errors:
Undefined symbols for architecture armv7:
"_CGRectDivide", referenced from:
-[GTMOAuth2ViewControllerTouch moveWebViewFromUnderNavigationBar] in GTMOAuth2ViewControllerTouch.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've followed instructions found in the Google guide to no avail.
I've done the following:
Included SystemConfiguration.framework and Security.framework
Dragged and dropped the GooglePlus.framework and the GoogleOpenSource.framework
from the SDK into my XCode project
Added the -ObjC flag to the app target's build settings
In addition to the previous steps I also tried adding the contents of the OpenSource folder provided in the SDK but that had no effect caused additional problems after the initial fix.
Libraries:
Full error message:
Ld "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-asdf/Build/Intermediates/MyApp.build/
Debug-iphoneos/MyAoo.build/Objects-normal/armv7/MyApp" normal armv7
cd /Users/me/code/MyApp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH
"/Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/
Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/
XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot
/Applications/Xcode.app/Contents/Developer/
Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
-L/Users/me/Library/Developer/Xcode/DerivedData/
MyApp-asdf/Build/Products/Debug-iphoneos
-L/Users/me/code/MyApp/MyApp
-F/Users/me/Library/Developer/Xcode/DerivedData/MyApp-asdf/Build/Products/Debug-iphoneos
-F/Users/me/code/MyApp/../../Documents/FacebookSDK -F/Users/me/code/MyApp
-F/Users/me/code/MyApp/MyApp
-filelist "/Users/me/Library/Developer/Xcode/
DerivedData/MyApp-asdf/Build/Intermediates/
MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList"
-dead_strip -ObjC -lsqlite3.0 -fobjc-arc
-fobjc-link-runtime -miphoneos-version-min=6.1
-framework SystemConfiguration -framework Security
-framework CFNetwork -framework Social -framework Accounts
-framework EventKit -framework EventKitUI
-framework AVFoundation -framework MapKit
-framework Twitter -framework CoreMotion -framework CoreLocation
-lxml2 -framework QuartzCore
-framework MobileCoreServices -framework CoreData
-framework UIKit -framework Foundation
-framework Pinterest -framework GooglePlus
-framework GoogleOpenSource
-lGooglePlusUniversal -o
"/Users/me/Library/Developer/
Xcode/DerivedData/MyApp-asdf/Build/Intermediates/MyApp.build/
Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp"
Undefined symbols for architecture armv7:
"_CGRectDivide", referenced from:
-[GTMOAuth2ViewControllerTouch moveWebViewFromUnderNavigationBar] in
GTMOAuth2ViewControllerTouch.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm not sure what I missed but any help would be greatly appreciated.
Also link in the CoreGraphics framework. It's looking for the CGRectDivide method, which is part of CoreGraphics.
This error is caused by adding OpenSource folder to you project, xcode detects that there is a duplication of files. So you should only add GooglePlus.framework and the GoogleOpenSource.framework.
I've recently opened my previously working apps (before i upgraded to the new Xcode for iOS6) and i'm getting some errors. I've redownloaded the frameworks that were kicking back the errors but those same frameworks now seem to be giving me more trouble. Below is the error...
Ld /Users/JohnSlater/Library/Developer/Xcode/DerivedData/iFestApp-avmgjnvetjnjecdjprczkbgdkfas/Build/Intermediates/iFestApp.build/Debug-iphoneos/iFestApp.build/Objects-normal/armv7/iFestApp normal armv7
cd "/Users/JohnSlater/Desktop/iOS Apps/iFestival for V 2012"
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/JohnSlater/Library/Developer/Xcode/DerivedData/iFestApp-avmgjnvetjnjecdjprczkbgdkfas/Build/Products/Debug-iphoneos "-L/Users/JohnSlater/Desktop/iOS Apps/iFestival for V 2012/iFestApp/Resources/Frameworks/Airship" -F/Users/JohnSlater/Library/Developer/Xcode/DerivedData/iFestApp-avmgjnvetjnjecdjprczkbgdkfas/Build/Products/Debug-iphoneos -filelist /Users/JohnSlater/Library/Developer/Xcode/DerivedData/iFestApp-avmgjnvetjnjecdjprczkbgdkfas/Build/Intermediates/iFestApp.build/Debug-iphoneos/iFestApp.build/Objects-normal/armv7/iFestApp.LinkFileList -dead_strip -fobjc-link-runtime -miphoneos-version-min=5.0 -framework QuartzCore -framework Security -framework AudioToolbox -framework MessageUI -framework StoreKit -framework CoreTelephony -lsqlite3 -framework AVFoundation -lz -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework CoreLocation -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -lUAirship-1.3.3 -lUAirshipPush-1.3.3 -o /Users/JohnSlater/Library/Developer/Xcode/DerivedData/iFestApp-avmgjnvetjnjecdjprczkbgdkfas/Build/Intermediates/iFestApp.build/Debug-iphoneos/iFestApp.build/Objects-normal/armv7/iFestApp
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FlurryAnalytics", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone give me some guidance as i've been unable to find a straight answer.
Thanks.
If you want to support iPhone 5 configurations you have to reconfigure the whole project and make it run with armv7s architecture.
If you just want to get rid of the errors you should remove all the armv7s references, including all libs.
This may help a little: Moving to iOS6 I get this linker error with almost all external packages
I have a problem with that error :
Undefined symbols for architecture i386:
When I build and go, it run successfully on the simulator but not on the device, I try a simple new project, I try to run it on the device, it was ok, but this project didn't run because of that error, the full stack error is this :
Ld "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests" normal i386
cd /Users/imac/Desktop/route-me-route-me-b07b654/MapView
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -F/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -filelist "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Intermediates/MapView.build/Debug-iphonesimulator/Unit Tests.build/Objects-normal/i386/RM Unit Tests.LinkFileList" -mmacosx-version-min=10.6 -framework Foundation -framework UIKit -Xlinker -objc_abi_version -Xlinker 2 /Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/libProj4.a -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework Foundation -lsqlite3 -framework QuartzCore -framework UIKit -o "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RMDBTileImage", referenced from:
objc-class-ref in RMTileImage.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
I changed the build mode, so I have choosed the device(in my case i use an iPod 4.3.5), now I have an other error :
'FavoriteCities.app' was built for 'i386', but the device 'iPod (Imac)' requires 'armv7' or compatible architecture.
FavoriteCities is my application name, please help me to figure out what could be the problem causing all that.
You need to change build architecture for device builds. It should have been armv6/7 by default for iOS app, but I guess you or something you did messed those settings up.
(In Xcode 4) select your project, go to Build Settings tab and make sure it looks like this: