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.
Related
I just opened my project which was made in xcode 3.1.5 version in xcode 4.2 and am getting the following error's can anyone please help me in this regard.
1)
Ld /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer normal i386
cd /Users/hasmukh.mandavia/Desktop/DevelopmentArea/ARecipe
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/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator -L/Users/hasmukh.mandavia/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/lib -L/Users/hasmukh.mandavia/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/lib/gstreamer-0.10 -L/Users/hasmukh.mandavia/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/lib/pkgconfig -F/Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator -filelist /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Intermediates/ARecipeViewer.build/Debug-iphonesimulator/ARecipeViewer.build/Objects-normal/i386/ARecipeViewer.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lpocketsphinx -lsphinxbase -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30100 -framework Foundation -framework UIKit -lsqlite3.0 -framework AudioToolbox -framework CFNetwork -liconv -lcv -lcxcore -framework CoreGraphics -framework QuartzCore -framework OpenGLES -o /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer
ld: library not found for -lcv
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
2)
GenerateDSYMFile /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app.dSYM /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer
cd /Users/hasmukh.mandavia/Desktop/DevelopmentArea/ARecipe
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/dsymutil /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer -o /Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app.dSYM
error: unable to open executable '/Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer'
1.) As the first error says
ld: library not found for -lcv
It means your project needs a static library for 'cv' and
either its is not there in your project or placed at some different location(if you are using it)
or
you are putting additional compiler flag in build settings(if you are not using the library in your code). following compiler flags in build settings.
-liconv -lcv -lcxcore
put cv library at right location.(so that it can be included in project).
2.) Second error may be because .app file is yet not created in derived data directory.
Go at path shown in error, i.e.. and verify whether .app file exist or not.
error: unable to open executable '/Users/hasmukh.mandavia/Library/Developer/Xcode/DerivedData/ARecipeViewer-cdsqawgcznmakicuonkiinivjeed/Build/Products/Debug-iphonesimulator/ARecipeViewer.app/ARecipeViewer'
I am trying to reuse one code in ios application . That code has several frameworks for mac and ios both . I don't know which file is for mac os and which one is for ios , so I included all in new project ,Included frameworks also , But I am receiving error for Application services framework . I know Application Services framework is only available for MAC Os not for ios . But If I delete ApplicationServices framework from my project then it will give more errors , since it is being used in some class. Here is my error log
ld /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal normal i386
cd "/Users/Documents/ios5 Examples/FlacPlayerUniversal"
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/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-4.3/lib" "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-simulator-4.3/lib" -F/Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-F/Users/Documents/ios5 Examples/FlacPlayerUniversal" -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/Library/Frameworks -filelist /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Intermediates/FlacPlayerUniversal.build/Debug-iphonesimulator/FlacPlayerUniversal.build/Objects-normal/i386/FlacPlayerUniversal.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 CoreGraphics -framework ApplicationServices -framework Accelerate -framework CoreFoundation -framework CFNetwork -framework AudioToolbox -framework CoreAudio -framework UIKit -framework Foundation -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -o /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal
ld: framework not found ApplicationServices
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
Please help to solve this error .
OS X and iOS have similar but not the same frameworks. You should remove anything which depends on OS X frameworks not available for iOS.
The ApplicationServices framework is not available on iOS. So you need to modify your framework so that it doesn't attempt to link to the ApplicationServices framework for its iOS variant. It thus also may not try to call any Mac OS X specific functions or reference any Mac OS X specific symbols when you compile for iOS. There is no way to make it work otherwise.
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.
Im getting the below build errors after reassociating all of the 'cocos2d sources' files into my project to update it from 0.99.0 to 0.99.3. Any clues what might be causing this or do I have to create a new project with the appropriate template and associate the proper files into the new project?
PS. I am not upgrading to the newest version as it requires Lion or an Apple developer license which I have not yet procured.
Building target “Puzzle” of project “Puzzle” with configuration “Debug”
Checking Dependencies
Ld "/Users/Sup3rpanda/Dev/My Projects/Builds/Debug-iphonesimulator/Puzzle.app/Puzzle" normal i386
cd "/Users/Sup3rpanda/Dev/My Projects/Puzzle"
setenv MACOSX_DEPLOYMENT_TARGET 10.5
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/iPhoneSimulator3.1.3.sdk "-L/Users/Sup3rpanda/Dev/My Projects/Builds/Debug-iphonesimulator" "-F/Users/Sup3rpanda/Dev/My Projects/Builds/Debug-iphonesimulator" -filelist "/Users/Sup3rpanda/Dev/My Projects/Builds/Puzzle.build/Debug-iphonesimulator/Puzzle.build/Objects-normal/i386/Puzzle.LinkFileList" -mmacosx-version-min=10.5 -all_load -ObjC -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -o "/Users/Sup3rpanda/Dev/My Projects/Builds/Debug-iphonesimulator/Puzzle.app/Puzzle"
ld: library not found for -lcocos2d libraries
collect2: ld returned 1 exit status
Weird, there was a 'libcocos2d.a' being built as a target. Removing that allowed me to successfully build again.
http://www.cocos2d-iphone.org/forum/topic/3384
I am getting Apple Mach-O Linker Id error, while compiling the iphone app. And getting below error
Ld
"/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator/Tiger
Dev.app/Tiger Dev" normal i386
cd /Users/adminbluepal/Desktop/Dir-Tiger_latest
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/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator
-F/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator
-filelist "/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Intermediates/Tiger.build/Debug-iphonesimulator/Tiger.build/Objects-normal/i386/Tiger
Dev.LinkFileList" -Xlinker
--no-demangle -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -liLibs -framework AVFoundation -framework AudioToolbox -framework CoreMedia
-framework Foundation -framework GameKit -framework OpenGLES -framework
QuartzCore -framework Security
-framework SystemConfiguration -framework UIKit -lz -o "/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator/Tiger
Dev.app/Tiger Dev"
ld: library not found for -liLibs
collect2: ld returned 1 exit status
Command
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
failed with exit code 1
Please help me out of this
Thank you,
Madan Mohan
Yesterday i had this problem.... cleared that error with the help of this answer. it may help you also...
You probably don't have the CoreGraphics.framework added to your frameworks list.
To make sure, click the "Frameworks" folder on Xcode. If the framework isn't listed on the table to the right, you'll need to add it by right-clicking the Frameworks folder, chooseing "Add Existing Framework..." and then choosing it from the list.
Source stack overflow previous question
Sounds like you're trying to use the iLibs library (Google says it's something for game development). XCode cannot properly link to it. Try adding their Framework to your project, or read the help docs of the library for help with its setup. Alternatively, see if you can remove the "-liLibs" linker flag in your build settings, if you aren't using the library.