I have no idea how to debug this, and I've been banging my head against the wall for hours. Here is the error I got:
Ld /Users/MyAccount/Library/Developer/Xcode/DerivedData/TAC-goimuvevceqxowccylmmpcflbtvz/Build/Products/Debug-iphonesimulator/TAC.app/TAC normal i386
cd "/Users/MyAccount/Desktop/Programming Stuff/iOS Programming/XCode 4/TAC"
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-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/MyAccount/Library/Developer/Xcode/DerivedData/TAC-goimuvevceqxowccylmmpcflbtvz/Build/Products/Debug-iphonesimulator -L/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0/Symbols/usr/lib "-L/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/usr/lib" -F/Users/MyAccount/Library/Developer/Xcode/DerivedData/TAC-goimuvevceqxowccylmmpcflbtvz/Build/Products/Debug-iphonesimulator "-F/Users/MyAccount/Desktop/Programming Stuff/iOS Programming/XCode 4/TAC" -filelist /Users/MyAccount/Library/Developer/Xcode/DerivedData/TAC-goimuvevceqxowccylmmpcflbtvz/Build/Intermediates/TAC.build/Debug-iphonesimulator/TAC.build/Objects-normal/i386/TAC.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -framework UIKit -framework Foundation -framework CoreGraphics -framework Security -framework CoreMotion -framework SystemConfiguration -framework CFNetwork -framework MobileCoreServices -lxml2.2 -lz.1.2.5 -o /Users/MasonSilber/Library/Developer/Xcode/DerivedData/TAC-goimuvevceqxowccylmmpcflbtvz/Build/Products/Debug-iphonesimulator/TAC.app/TAC
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0/Symbols/usr/lib/libxml2.2.dylib, missing required architecture i386 in file
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
Any help is really appreciated. I would normally spend more time working on my own to solve the problem, but I really have no idea where to start.
If you are building against Simulator then you explicitly need to add i386 as an valid architecture. Also check under platform you have "iphonesimulator". Just click on your project file and it will reveal Build settings in the right side editor. You will find these settings there. Hope it helps.
It is saying that there is a missing 32 bit Intel architecture in the relevant libraries.
I would ask why you are persisting with GCC 4.2 when LLVM 2.0 is the default compiler now and gcc development has been shut down (at Apple)
Have a go at switching to LLVM 2.1 and see if the problem remains.
You really need to be asking about this bug on the Apple Dev forums if it's important to you to use GCC as iOS 5 and XCode 4.2 are NDA
You have forgot to add any library.try to add a directory that what you have missed.It resolve this issue.
Related
So for one of my classes, we are supposed to refactor this project from last quarter that was left in a pretty bad state.
So we are trying to write unit tests for the project, but they used an old version of Xcode, so we had to re-add the XCTest framework to "Link Binary With Libraries".
I accidentally added the MacOSX version of it the first time, and noticed my error. I removed the OS X version from the linker, and added the iPhoneSimulator version to it. It kept giving me the same error. So I removed all XCTest.framework files from the Build Phases, and it gave me an error about OCMock (which is a totally different problem that I'm not concerned about right now), which means it knows it's gone. So I then tried re-adding XCTest.framework to my test target, making sure it was the iOSSimulator version, and it gives me the same error about it being the Mac OS X version. I have tried restarting Xcode and did correctly that I did before but that did not work. Below is the full output from the error.
Ld /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/HenryTests.xctest/HenryTests normal x86_64
cd /Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry
export IPHONEOS_DEPLOYMENT_TARGET=7.1
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator -L/Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry -F/Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Users/MY_USERNAME/Git/JrProj-1415-Mike/Code/iOS/Henry -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/Developer/Library/Frameworks -filelist /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Intermediates/Henry.build/Debug-iphonesimulator/HenryTests.build/Objects-normal/x86_64/HenryTests.LinkFileList -bundle_loader /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/Henry.app/Henry -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -lOCMock -framework UIKit -framework Foundation -framework Firebase -Xlinker -dependency_info -Xlinker /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Intermediates/Henry.build/Debug-iphonesimulator/HenryTests.build/Objects-normal/x86_64/HenryTests_dependency_info.dat -o /Users/MY_USERNAME/Library/Developer/Xcode/DerivedData/Henry-ayqkhtmgjufxaagawvfjprhgilji/Build/Products/Debug-iphonesimulator/HenryTests.xctest/HenryTests
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In case anyone come across this problem too, pretty much the only solution is to make a new project, and add all the files to that new project. I've talked to some professionals in iOS development, and they could come up with no other solution. I think it has something to do with the project being from a pretty old version of Xcode, and the new XCTest framework being pretty new. Good luck to you if you come across this too.
I recently tried to archive my product in order to submit it to the app store, but came across this error that has eaten up my time. The error goes as follows:
Ld
/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/IntermediateBuildFilesPath/Alter.build/App\
Store-iphoneos/Alter.build/Objects-normal/armv7/Alter normal armv7
cd /Applications/MAMP/htdocs/Alter/platforms/ios
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export 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/iPhoneOS7.1.sdk
-L/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/BuildProductsPath/App\ Store-iphoneos
-F/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/BuildProductsPath/App\ Store-iphoneos -filelist
/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/IntermediateBuildFilesPath/Alter.build/App\
Store-iphoneos/Alter.build/Objects-normal/armv7/Alter.LinkFileList
-dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/BuildProductsPath/App\ Store-iphoneos/libCordova.a -ObjC
-fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework AssetsLibrary
/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/BuildProductsPath/Release-iphoneos/libCordova.a -framework
CoreGraphics -framework MobileCoreServices -framework CoreLocation
-Xlinker -dependency_info -Xlinker /Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/IntermediateBuildFilesPath/Alter.build/App\
Store-iphoneos/Alter.build/Objects-normal/armv7/Alter_dependency_info.dat
-o /Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App\
Store/IntermediateBuildFilesPath/Alter.build/App\
Store-iphoneos/Alter.build/Objects-normal/armv7/Alter
This error also follows:
ld: file not found:
/Users/guled/Library/Developer/Xcode/DerivedData/Alter-arpezfgnfzcguefnjpllgwzddkld/Build/Intermediates/ArchiveIntermediates/Alter-App
Store/BuildProductsPath/App Store-iphoneos/libCordova.a clang: error:
linker command failed with exit code 1 (use -v to see invocation)
Can someone help me?
This issue was driving me crazy for hours. Apps builds and runs fine. Cannot create archive. Cordova 3.5 and Xcode 5.1.1.
I was able to resolve this issue by using the solution in the comments from Somnibyte. I was creating a "Distribution" build configuration (like I always do), and I was unable to create an archive from this "Distribution" configuration. Spent hours tinkering and trying. I finally found the comment from Somnibyte, attempted to simply archive the "Release" build configuration instead, and... BAM! It worked! Thank you thank you thank you Somnibyte. Hope this saves someone else some time.
I think the issue may be here:
Have you tried manually adding the libcordova.a file to the xcode project? Thats all I can think of, having no experience with cordova myself.
The error here seems to be that xcode is just failing to find the libcordova.a, so this link may help some.
https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaLibrarytoaTarget.html
To start, i looked at all the other search topics and none applied or didn't work. For example, i have a hard time that apple didn't make xctest compatible with all architectures.
On a Xcode project for work i randomly started getting the following build error on linking:
Ld /Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Intermediates/InVenueExperience.build/Debug-iphoneos/InVenueExperience.build/Objects-normal/armv7/InVenueExperience normal armv7
cd /Users/eallen/tmdev/ios/mive
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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Products/Debug-iphoneos -L/Users/eallen/tmdev/ios/mive -L/Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Intermediates -F/Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Products/Debug-iphoneos -FFrameworks -FPods/Pixate/Framework/iOS -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/Developer/Library/Frameworks -filelist /Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Intermediates/InVenueExperience.build/Debug-iphoneos/InVenueExperience.build/Objects-normal/armv7/InVenueExperience.LinkFileList -dead_strip -ObjC -lObjC -lxml2 -framework CoreGraphics -framework CoreText -framework MobileCoreServices -framework Pixate -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -fprofile-arcs -ftest-coverage -miphoneos-version-min=7.0 -lPods -framework QuartzCore -framework CoreText -framework CoreGraphics -framework CoreData -framework UIKit -framework Foundation -framework Crashlytics -Xlinker -dependency_info -Xlinker /Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Intermediates/InVenueExperience.build/Debug-iphoneos/InVenueExperience.build/Objects-normal/armv7/InVenueExperience_dependency_info.dat -o /Users/eallen/Library/Developer/Xcode/DerivedData/InVenueExperience-fgszkxctprmkuvbvwzgprcuveheo/Build/Intermediates/InVenueExperience.build/Debug-iphoneos/InVenueExperience.build/Objects-normal/armv7/InVenueExperience
ld: in '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest', missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest (2 slices) for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
All this while trying to build my application target and NOT my test target. Some further notes:
I am NOT linking against XCTest in my build settings for the application target
I am building, not testing this specific target
I do have in both my build settings -> Architectures|Valid Architectures "Standard Architectures (armv7, armv7s).
This only happens when i build for a iOS device and not a simulator...i think this is because building for a simulator only tries the i386 architecture?
To be honest, i have no idea why the linker is even trying to link against XCTest in this case...i even modified the scheme to remove all tests though i wasn't trying to test against the target.
Please feel free to ask me any other questions.
You may have the same simple but frustrating problem as I had. It's a scheme setting:
Click on your project scheme in the toolbar (right of the play/stop buttons), and select 'Edit' from the popup. Under the 'Build' item on the left, make sure your test targets only have 'Test' checked.
Please make sure the Build Setting of "build Active Architecture only" is set to NO, maybe it's the cause of this problem.
Turns out that buried deep in the compile sources for the application target i had a file that included imports for XCTest stuff...removing this immediately made this go away.
So answer being verify that you do not have anything in your compile sources list that may reference a library you didn't intend
I just had the same issue after including a third-party project. When selecting the target I chose the main project target (not the test target), but the included project had a sub-target which were unit tests. Xcode helpfully added those to my main application target. After changing the target setting for the relevant file it worked alright.
It happens that after adding $(PLATFORM_DIR)/Developer/Library/Frameworks as a first item in <Target>/<Build Settings>/<Search Paths>/<Framework Search Paths> I got rid of nasty "ld: framework not found XCTest for architecture arm64" link error by using XCode 6.3.1.
I am getting this error when I am trying to run it on my device, however it working fine when I run it on simulator. Is this a tool chain error or SDK header error? Below is the error message I obtain when compiling.
Error Message:
Ld /Users/KhangYu/Library/Developer/Xcode/DerivedData/mobiletimetec-bbuzqjqgmijmomgdmvebkbyasqii/Build/Intermediates/mobiletimetec.build/Debug-iphoneos/mobiletimetec.build/Objects-normal/armv7/mobiletimetec normal armv7
cd /Users/KhangYu/Desktop/KPTesting/setting
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/KhangYu/Library/Developer/Xcode/DerivedData/mobiletimetec-bbuzqjqgmijmomgdmvebkbyasqii/Build/Products/Debug-iphoneos -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system -F/Users/KhangYu/Library/Developer/Xcode/DerivedData/mobiletimetec-bbuzqjqgmijmomgdmvebkbyasqii/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/KhangYu/Library/Developer/Xcode/DerivedData/mobiletimetec-bbuzqjqgmijmomgdmvebkbyasqii/Build/Intermediates/mobiletimetec.build/Debug-iphoneos/mobiletimetec.build/Objects-normal/armv7/mobiletimetec.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework SystemConfiguration -framework AVFoundation -lsqlite3.0 -framework MapKit -framework CoreLocation -framework MessageUI -framework QuartzCore -framework Security -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/KhangYu/Library/Developer/Xcode/DerivedData/mobiletimetec-bbuzqjqgmijmomgdmvebkbyasqii/Build/Intermediates/mobiletimetec.build/Debug-iphoneos/mobiletimetec.build/Objects-normal/armv7/mobiletimetec
ld: library not found for -lobjc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
//-- END --
This is going to be the death of me. Any idea on how to solve it? Your help will be greatly appreciated.
Thanks in advance.
Solution
Thanks Kevin and Jasper Blues reply and also thanks Reno Jones to edit my post.
After hours of trying to fix this, I renamed the file "libobjc.A.dylib" to "libobjc.dylib"and the error disappear.
P/S: "libobjc.A.dylib" - located in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/*/usr/lib/, thanks again to Kevin.
My guess is that it works on the Simulator, but not the device because you've specified separate 'OTHER LINKER FLAGS' for both 'Debug' and 'Release' configurations. You'd usually do this if you're linking in a debug framework such as 'Reveal', 'DCIntrospect', etc.
The one for 'Release' looks to be incorrect. It should be '-Objc' and not '-lObjc' - we're telling the compiler that we're using Objective-C itself, and not to load a library called 'Objc'.
To correct:
In Xcode, click on the target for your App.
Open the 'Build Settings' tab.
Search for 'Other linker flags' - so you're not overwhelmed by options.
Correct the 'Release' config. Change '-lObjc' to '-Objc'
There is no need to rename "libobjc.A.dylib", just re-link it like : ln -s ./libobjc.A.dylib ./libobjc.dylib
I have an error below:
ld /Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Products/Debug-iphonesimulator/uniText.app/uniText normal i386
cd "/Volumes/Data/Documents/XCode Projects/Trans SMS"
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-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Products/Debug-iphonesimulator -F/Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Products/Debug-iphonesimulator -filelist /Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Intermediates/uniText.build/Debug-iphonesimulator/uniText.build/Objects-normal/i386/uniText.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework SystemConfiguration -framework MessageUI -framework AddressBook -framework AddressBookUI -framework CoreTelephony -lsqlite3.0 -framework UIKit -framework Foundation -framework CoreGraphics -o /Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Products/Debug-iphonesimulator/uniText.app/uniText
ld: duplicate symbol _OBJC_IVAR_$_FMDatabase.databasePath in /Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Intermediates/uniText.build/Debug-iphonesimulator/uniText.build/Objects-normal/i386/FMDatabase-566DC6D59187887D.o and /Volumes/Data/Library/Developer/Xcode/DerivedData/uniText-cgynaitlevdrajfeoaldwldehaft/Build/Intermediates/uniText.build/Debug-iphonesimulator/uniText.build/Objects-normal/i386/FMDatabase-566DC6D59187887D.o for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
Could someone help me out?
It used to work properly before.
I have no idea what I have changed in the project sources.
But I am sure that I never changed anything in that FMDatabase.h and .m.
The relevant portion of your error is ld: duplicate symbol _OBJC_IVAR_$_FMDatabase.databasePath. For some reason, the linker (ld) is trying to link FMDatabase twice. Check to see if you have multiple copies of it in your project.
I once got this error when I was initializing values to constants defined in the global scope in my .h file.
Solved the problem, by declaring them in the header, and initializing them in the .m file.
This is a quite old post, but maybe it still helps somebody.
Just had the same problem, for me the solution was: I accidently linked an .m file in one of the headers instead of the .h file. Just changed that to properly link the .h file.
Check if you import framework which required.
I solve the problem by updating my framework.
I solved by performing a Clean .
Then could Build.