Can Any one Tell me how to solve this Error...
My X-Code is Version 4.2.
My IOS Simulator is Version 5.0
Ld build/Debug-iphonesimulator/M3DFree.app/M3DFree normal i386
cd "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D"
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/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator" "-F/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator" -filelist "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Match3D.build/Debug-iphonesimulator/Match3DFree.build/Objects-normal/i386/M3DFree.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 AppController.m -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -framework GameKit -lsqlite3.0 -framework StoreKit -framework MediaPlayer -framework AudioToolbox -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -o "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator/M3DFree.app/M3DFree"
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
The error mentions something about
D__IPHONE_OS_VERSION_MIN_REQUIRED=30200
Which is a reference to iOS 3.2 (the first iPad OS). Check your build target and make sure that you are building for iOS 5 and that the deployment target is 4.3 or above.
If that doesn't help then it's probably just "one of those Xcode bugs" and doing a clean build, resetting your simulator, clearing your project cache and rebooting your Mac will probably fix it.
Related
I don't understand my error:
Ld
Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/Test.app/Test
normal i386
cd /Users/lol/Desktop/Test
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/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator
-L/Users/lol/Desktop/Test -F/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator
-filelist /Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Intermediates/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/Test.LinkFileList
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -lextThree20JSON+SBJSON /Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20UICommon.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20UINavigator.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20Core.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20UI.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20Network.a
/Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/libThree20Style.a
-framework SystemConfiguration -framework MobileCoreServices -framework CFNetwork -framework AddressBook -framework AddressBookUI -framework QuartzCore -framework UIKit -framework Foundation -framework MessageUI -framework CoreGraphics -lz.1.2.3 -lxml2.2.7.3 -o /Users/lol/Library/Developer/Xcode/DerivedData/Test-aywxyvnakaqhmwfbwellynwqmoik/Build/Products/Debug-iphonesimulator/Test.app/Test
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
Can you help me to understand this?
Thanks a lot ;)
The option -lz.1.2.3 means that the compiler is attempting to link the file libz.1.2.3.a, libz.1.2.3.so, or libz.1.2.3.dylib. It cannot find any of these variations and is failing because of that.
You can attempt to find the location of this file and include it in your library include path.
My question is why are you linking a specific version of z lib? Usually, it's good enough to just have -lz or -llibz.dylib. Do you have a reason for picking a specific version? What happens when you link using the un-versioned name.
Just use -lz, there's no need to use the versioned link to it. So remove libz-1.2.3.tbd from frameworks and add libz.tbd.
In the project navigator, select your project.
Select your target.
Select the "Build Phases" tab.
Open "Link Binaries With Libraries" expander.
Remove libz-1.2.3.tbd
Click the + button.
Add libz.tbd
I'm trying to create a project utilizing both MailChimp and ShareKit code.
I believe I'm dynamically linking to them both by dragging their Xcode project files into my new project, then dragging and dropping the desired groups.
The problem I'm having now is that they both use a file name called SBJSonParser from their JSON libraries.
I'm getting an error that says:
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser
I don't want / don't think renaming the files would be sufficient, as there are quite a few more filenames they have in common. Does anyone have ideas on what to do? Thanks
Full error:
Ld /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator/PolaroidMe.app/PolaroidMe normal i386
cd /Users/user/Documents/PolaroidMe
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/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator -F/Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator -filelist /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/PolaroidMe.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 CoreLocation -framework Twitter -framework CFNetwork -framework SystemConfiguration -framework Security -framework MessageUI -framework AVFoundation -framework MobileCoreServices -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Products/Debug-iphonesimulator/PolaroidMe.app/PolaroidMe
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser in /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-7C0C46CE63D45CA3.o and /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-227BA1E6AFC01E91.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
ld: duplicate symbol _OBJC_CLASS_$_SBJsonParser in /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-7C0C46CE63D45CA3.o and /Users/user/Library/Developer/Xcode/DerivedData/PolaroidMe-gvmchgayobqfebhcnhfwhxoueaeo/Build/Intermediates/PolaroidMe.build/Debug-iphonesimulator/PolaroidMe.build/Objects-normal/i386/SBJsonParser-227BA1E6AFC01E91.o for architecture i386
SBJSON is a library, it only needs to be inside your project once. Just delete one of them.
Just replaced my XCode 4.0.1 with 4.2. Trying to run the iPhone game project I’m currently working on, faced the error:
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
The full text:
Ld "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road" normal i386
cd "/MyProjects/Hit The Road"
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/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -F/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -filelist "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Intermediates/HitTheRoad.build/Debug-iphonesimulator/Drive.build/Objects-normal/i386/Hit The Road.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz -ObjC -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -lz.1.2.3 -weak_framework MapKit -framework CoreLocation -weak_framework GameKit -framework AddressBookUI -framework AddressBook -framework CFNetwork -framework MobileCoreServices -lsqlite3.0 -framework SystemConfiguration -framework Security -framework QuartzCore -weak_framework UIKit -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -weak_framework Foundation -framework CoreGraphics -o "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road"
Trying to figure out what’s wrong, found out that it could be about the Mac OS X Deployment Target. So I’ve tried to set it to 10.4 10.5 and 10.6. Unfortunately it didn’t help.
I’m working on MacOS 10.6.8
Did anybody get such errors before?
Maybe someone know at least what this error is about?
Click the Project in the File Navigator, then select the Target. Scroll down to Linked Frameworks and Libraries and find the libz library being used and remove it, the name may be colored red. Next, click "+" and type libz and add a version 1.2.3 or newer. Often, simply selecting libz.dylib will work. Finally, clean and rebuild.
d /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator/Goozzy.app/Goozzy normal i386
cd /Users/yariksmirnov/Desktop/Goozy/branches/new
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/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -F/Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -filelist /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Intermediates/Goozzy.build/Debug-iphonesimulator/Goozzy.build/Objects-normal/i386/Goozzy.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -framework CoreData -lz.1.2.3 -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator/Goozzy.app/Goozzy
*ld: library not found for -lz.1.2.3*
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
How do I fix this error?
It's very strange -- I compile a build for iOS, but get a error about Mac OS deployment target.
You should link libz.dylib not any specific version. The correct version gets used automatically.
Update the libz dylib version in your project definition to whatever your XCode 4.2 is providing. If you are compiling the same code for different targets, check the library version on each of them.
Since SDK 3.2 all versions of libz are symbolic links to the last version (libz.1.2.3 in SDK 4.3), so regardless of what libz-version you choose, you get the last one. See /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/Symbols/usr/lib.
I don't know what Apple will do in the future. If you link to libz you are likely to keep linking to the latest version. A change in the major number of the library (libz-X) could break compatibility, so a safer choice is to keep linking the same version you have now. Your choice.
I migrated from iphoneOS3.1.2.sdk to iphoneOS4.0.sdk and had to re-reference all frameworks.
The old OpenAL reference is getting stuck in the build script as I see the new one but the old one is also there:
Ld build/Debug-iphonesimulator/AweTrainGameEngine.app/AweTrainGameEngine normal i386
cd /Users/yuri/Desktop/AweTrainGameEngine
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/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/Users/yuri/Desktop/AweTrainGameEngine/build/Debug-iphonesimulator -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib -F/Users/yuri/Desktop/AweTrainGameEngine/build/Debug-iphonesimulator -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/Frameworks/OpenAL.framework -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks -F/Users/yuri/Desktop/AweTrainGameEngine -filelist /Users/yuri/Desktop/AweTrainGameEngine/build/AweTrainGameEngine.build/Debug-iphonesimulator/AweTrainGameEngine.build/Objects-normal/i386/AweTrainGameEngine.LinkFileList -mmacosx-version-min=10.6 -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 -lxml2 -framework AudioToolbox -framework Foundation -framework QuartzCore -framework AVFoundation -framework UIKit -framework CoreGraphics -framework OpenAL -o /Users/yuri/Desktop/AweTrainGameEngine/build/Debug-iphonesimulator/AweTrainGameEngine.app/AweTrainGameEngine
I have searched thoroughly for manually cleaning up of the PATH environmental variable of Xcode but found nothing of value. I can't locate ~/.MacOSX/environment.plist on my snow leopard 10.6.3 system.
Please help!