I know that this question had been asked many times, but every answer seems different. I have built my project and tried to run it, but I get this error:
Ld "/Users/******/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator/Cypher Bot.app/Cypher Bot" normal i386
cd "/Users/******/Xcode/iOS/Cypher Bot/Universal/Cypher Bot/Cypher Bot"
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator -F/Users/**********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator -filelist "/Users/*******/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Intermediates/Cypher Bot.build/Debug-iphonesimulator/Cypher Bot.build/Objects-normal/i386/Cypher Bot.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o "/Users/********/Library/Developer/Xcode/DerivedData/Cypher_Bot-dxylepzskcnrtybprtuaotmycjjo/Build/Products/Debug-iphonesimulator/Cypher Bot.app/Cypher Bot"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in CryptoMainViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also get this right below the message above:
What does this mean? What do I do to fix it?
The error means that the linker can't find the class definition for MFMailComposeViewController. That class is defined in the MessageUI framework. Did you add the MessageUI framework to your target? If you don't know how to do that, read this: How to "add existing frameworks" in Xcode 4?
Related
When I try to build my Xcode project this error comes up:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It is really frustrating because I cannot get rid of it. It shows up in my normal target and my test target. Please help.
The full error is below thanks.
Ld /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator/Dotcha!.app/Dotcha! normal i386
cd "/Users/callumbondy/Desktop/Desktop/Projects/Dotcha!"
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export 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/iPhoneSimulator8.3.sdk -L/Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator -L/Applications/Adobe\ Flash\ CC\ 2014/AIR13.0/lib/aot/stub -F/Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator -filelist /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha!.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha_.swiftmodule -mios-simulator-version-min=8.2 -framework StoreKit -framework iAd -framework GameKit -Xlinker -dependency_info -Xlinker /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Intermediates/Dotcha!.build/Debug-iphonesimulator/Dotcha!.build/Objects-normal/i386/Dotcha!_dependency_info.dat -o /Users/callumbondy/Library/Developer/Xcode/DerivedData/Dotcha!-ajrirvxbqfcklkfaxgrfgwslckom/Build/Products/Debug-iphonesimulator/Dotcha!.app/Dotcha!
ld: warning: ignoring file /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libSystem.dylib, file was built for armv7 which is not the architecture being linked (i386): /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libSystem.dylib
ld: in '/Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libobjc.A.dylib', file was built for armv7 which is not the architecture being linked (i386): /Applications/Adobe Flash CC 2014/AIR13.0/lib/aot/stub/libobjc.A.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The library libobjc.A.dylib that you are using don't have an i386 architecture slice. You probably is getting this error when running the app on simulator right?
Compile using a compatible version of your library or try to run on a real device to see if it resolves your problem.
I am attempting to call the CFSwapInt32HostToBig(<#arg: UInt32#>) method in swift file. I have added the CoreFoundation Framework to the project and I have "import CoreFoundation" at the top of my swift file. When I begin to type the method name, XCode suggest the method indicating to me that Xcode is recognizing methods from that framework. I have no errors in Xcode implying that all of my syntax is correct, but when I build I get the following error.
> Ld DerivedData/AudioToy/Build/Products/Debug-iphonesimulator/AudioToy.app/AudioToy normal x86_64
cd /Users/michaliberman/Documents/Projects/Swift/AudioToy
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export 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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Products/Debug-iphonesimulator -F/Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Products/Debug-iphonesimulator -filelist /Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Intermediates/AudioToy.build/Debug-iphonesimulator/AudioToy.build/Objects-normal/x86_64/AudioToy.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Intermediates/AudioToy.build/Debug-iphonesimulator/AudioToy.build/Objects-normal/x86_64/AudioToy.swiftmodule -mios-simulator-version-min=8.0 -framework CoreFoundation -framework AVFoundation -framework AudioToolbox -Xlinker -dependency_info -Xlinker /Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Intermediates/AudioToy.build/Debug-iphonesimulator/AudioToy.build/Objects-normal/x86_64/AudioToy_dependency_info.dat -o /Users/michaliberman/Documents/Projects/Swift/AudioToy/DerivedData/AudioToy/Build/Products/Debug-iphonesimulator/AudioToy.app/AudioToy
Undefined symbols for architecture x86_64:
"_CASwapFloat32", referenced from:
_CASwapFloat32HostToBig in AudioStudio.o
"__OSSwapInt32", referenced from:
_CFSwapInt32HostToBig in AudioStudio.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have removed and re-imported the framework, but I still get the error. When I option-click on the method name it shows me the header file in which the method is declared and it if I click on that header file I see that it is within the framework. I am not sure what to do when the problem appears to be within the framework.
Use the bigEndian and littleEndian methods
let valueLE16 = 16
let valueBE16 = valueLE16.bigEndian
println("valueLE16: \(valueLE16)") // valueLE16: 16
println("valueBE16: \(valueBE16)") // valueBE16: 1152921504606846976
let valueLE16: Int16 = 16 //UnsafePointer<UInt16>(value.bytes)[0]
let valueBE16: Int16 = valueLE16.bigEndian
println("valueLE16: \(valueLE16)") // valueLE16: 16
println("valueBE16: \(valueBE16)") // valueBE16: 4096
my project blows up with this message:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I cannot figure out what I am doing wrong. I've taken out all of the offending code (i think), and I've even deleted everything back to the original classes, but I still get the messages.
Any suggestions?
Thanks.
here's the entire log:
Ld /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Products/Debug-iphonesimulator/NewTest.app/NewTest normal i386
cd "/Users/xxxx/Desktop/NewTest copy"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
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/iPhoneSimulator5.1.sdk -L/Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Products/Debug-iphonesimulator -F/Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Products/Debug-iphonesimulator -filelist /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Intermediates/NewTest.build/Debug-iphonesimulator/NewTest.build/Objects-normal/i386/NewTest.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Products/Debug-iphonesimulator/NewTest.app/NewTest
ld: duplicate symbol _OBJC_IVAR_$_ViewController.testprop3 in /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Intermediates/NewTest.build/Debug-iphonesimulator/NewTest.build/Objects-normal/i386/OtherClass.o and /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Intermediates/NewTest.build/Debug-iphonesimulator/NewTest.build/Objects-normal/i386/ViewController.o for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Duplicate symbol _OBJC_IVAR_$_ViewController.testprop3 in /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Intermediates/NewTest.build/Debug-iphonesimulator/NewTest.build/Objects-normal/i386/OtherClass.o and /Users/xxxx/Library/Developer/Xcode/DerivedData/NewTest-gwytsbxrryxjejdbvifxuyomdpug/Build/Intermediates/NewTest.build/Debug-iphonesimulator/NewTest.build/Objects-normal/i386/ViewController.o for architecture i386
It appears that you have double defined testprop3.
I get this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GameCenterManager", referenced from:
objc-class-ref in BT_viewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Info:
Ld /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator/LatinToGo.app/LatinToGo normal i386
cd /Users/Raoul/Downloads/latintogopro_v15_iOS
setenv MACOSX_DEPLOYMENT_TARGET 10.6
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/iPhoneSimulator5.0.sdk -L/Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator -L/Users/Raoul/Downloads/latintogopro_v15_iOS/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine -F/Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator -F/Users/Raoul/Downloads/latintogopro_v15_iOS/BT_Objects -filelist /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Intermediates/latintogopro.build/Debug-iphonesimulator/latintogopro.build/Objects-normal/i386/LatinToGo.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -framework GameKit -lxml2.2 -framework CoreAudio -framework CoreLocation -framework Foundation -framework SystemConfiguration -weak_framework UIKit -framework MobileCoreServices -framework AVFoundation -weak_framework MessageUI -lOAuth -framework MapKit -weak_framework MediaPlayer -framework CoreGraphics -framework QuartzCore -weak_framework iAd -o /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator/LatinToGo.app/LatinToGo
Go to your project, click on Build phases, Compile sources, Add GameCenterManager.m to the list.
Hope this will help :)
Presumably your code refers to the class called GameCenterManager but your project doesn't link to the framework that defines it.
If this is a built-in framework, then link to that framework: edit the target, in the Summary scroll down to the linked frameworks, press the Plus button to add the framework.
If this is a third-party framework, they should provide instructions for linking to their framework.
I have purchased reddle kit for ipad pdf viewer. when i try to run the demo program i am getting following error
Ld /Users/svp/Library/Developer/Xcode/DerivedData/RDPDFKitSample-gjablgzmrirtqteckhbcytapkwcc/Build/Products/Debug-iphonesimulator/RDPDFKitSample.app/RDPDFKitSample normal i386
cd /Users/svp/Desktop/RDPDFKitDemo_1_2
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/llvm-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/svp/Library/Developer/Xcode/DerivedData/RDPDFKitSample-gjablgzmrirtqteckhbcytapkwcc/Build/Products/Debug-iphonesimulator -L/Users/svp/Desktop/RDPDFKitDemo_1_2/RDPDFKit.embeddedframework/RDPDFKit.framework/Versions/A -F/Users/svp/Library/Developer/Xcode/DerivedData/RDPDFKitSample-gjablgzmrirtqteckhbcytapkwcc/Build/Products/Debug-iphonesimulator -F/Users/svp/Desktop/RDPDFKitDemo_1_2/RDPDFKit.embeddedframework -filelist /Users/svp/Library/Developer/Xcode/DerivedData/RDPDFKitSample-gjablgzmrirtqteckhbcytapkwcc/Build/Intermediates/RDPDFKitSample.build/Debug-iphonesimulator/RDPDFKitSample.build/Objects-normal/i386/RDPDFKitSample.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework SystemConfiguration -framework RDPDFKit -framework Security -framework OpenGLES -framework QuartzCore -lz -framework CoreText -framework MessageUI -weak_framework UIKit -weak_framework Foundation -framework CoreGraphics -o /Users/svp/Library/Developer/Xcode/DerivedData/RDPDFKitSample-gjablgzmrirtqteckhbcytapkwcc/Build/Products/Debug-iphonesimulator/RDPDFKitSample.app/RDPDFKitSample
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSFileCoordinator", referenced from:
objc-class-ref in RDPDFKit(libRDPDFKit.a-i386-master.o)
"_OBJC_CLASS_$_UIReferenceLibraryViewController", referenced from:
objc-class-ref in RDPDFKit(libRDPDFKit.a-i386-master.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
how can i solve this issue.
We don't support building with iOS 4 SDK.
Make sure you are building with iOS 5 SDK. YOur application will still be able to run on device with iOS 4.0.
Danil Somsikov
Readdle Inc.