i downloaded a project and i want to try it, but when i'm trying to compile it i get always this error:
Build TuneIn Radio of project TuneInRadio with configuration Release
Ld "build/Release-iphonesimulator/TuneIn Radio.app/TuneIn Radio" normal i386
cd /Users/marco/Downloads/projects
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.2.sdk -L/Users/marco/Downloads/projects/build/Release-iphonesimulator -L/Users/marco/Downloads/projects -L/Users/marco/Downloads/projects/TuneInRadio-iphonesimulator -L/Users/marco/Downloads/projects/MMS/build/Release-iphonesimulator -L/Users/marco/Downloads/projects/ffmpeg/build/Release-iphonesimulator -F/Users/marco/Downloads/projects/build/Release-iphonesimulator -F/Users/marco/Downloads/projects -filelist "/Users/marco/Downloads/projects/build/TuneInRadio.build/Release-iphonesimulator/TuneIn Radio.build/Objects-normal/i386/TuneIn Radio.LinkFileList" -lTuneInRadio -llibmms -lffmpegLib -ObjC -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework CoreGraphics -framework QuartzCore -framework CoreFoundation -framework AudioToolbox -framework MediaPlayer -framework CoreLocation -framework UIKit -lz.1 -framework SystemConfiguration -framework MapKit -o "/Users/marco/Downloads/projects/build/Release-iphonesimulator/TuneIn Radio.app/TuneIn Radio"
ld: warning: directory '/Users/marco/Downloads/projects/TuneInRadio-iphonesimulator' following -L not found
ld: warning: directory '/Users/marco/Downloads/projects/MMS/build/Release-iphonesimulator' following -L not found
ld: library not found for -lTuneInRadio
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Any advice on what kind of steps i can follow to reach the error ?
Thank's
The error indicates the problem:
ld: library not found for -lTuneInRadio
this means that your build/make is trying to find a library (called libTuneInRadio) to compile this program you're trying to build but it can't find it in the paths (the default ones + the ones described by the '-L' options on gcc call).
Not knowing any more about what you're compiling/building makes it impossible to say precisely what's happening other than you're missing this library.
Given the name of the library, it sounds like it should be part of the project you're trying to build (or maybe there is a related TuneInRadio-lib project), so I would suggest reading the README or BUILDING or similarly named file that might have come with the project to determine how to successfully compile this program.
I had the same problem compiling the project for iOS simulator, the problem is that the source code you downloaded does not contain the libTuneRadio.a library for TuneInRadio-iphonesimulator, so first create that folder and second move the libTuneRadio.a from TuneInRadio-iphoneos to the recently created folder. That should make it.
My application compiled successfully but it crashes as it cannot find any CasseteAudioPlayer class, so i guess there is still something wrong.
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'
This is the error log, which I got
Ld /Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Products/Debug-iphonesimulator/SMTPExample.app/SMTPExample normal i386
cd /Users/apple/Desktop/SMTPExample
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/xcode4/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/xcode4/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/xcode4/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /xcode4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Products/Debug-iphonesimulator -F/Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Products/Debug-iphonesimulator -F/Users/apple/Desktop/SMTPExample -filelist /Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Intermediates/SMTPExample.build/Debug-iphonesimulator/SMTPExample.build/Objects-normal/i386/SMTPExample.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Security -framework CFNetwork -framework UIKit -framework Foundation -framework CoreGraphics -framework DropboxSDK -o /Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Products/Debug-iphonesimulator/SMTPExample.app/SMTPExample
ld: duplicate symbol _EstimateBas64EncodedDataSize in /Users/apple/Desktop/SMTPExample/DropboxSDK.framework/DropboxSDK and /Users/apple/Library/Developer/Xcode/DerivedData/SMTPExample-dkhosyetbsajvtcdyyalnckswjgd/Build/Intermediates/SMTPExample.build/Debug-iphonesimulator/SMTPExample.build/Objects-normal/i386/Base64Transcoder.o for architecture i386
collect2: ld returned 1 exit status
Command /xcode4/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
This is a linker error (the "ld" in the output indicates this, because the output error has been generated by the GNU linker program).
What has happened is that two identical declarations have been compiled separately from two separate source code files. One of these source files might be named Base64Transcoder.m or Base64Transcoder.cpp (as the compiled file that's caused the problem is Base64Transcoder.o). The declaration in question is _EstimateBas64EncodingDataSize. This symbol is being declared multiple times within different source code files, and then the linker is throwing an error because the two compiled source code files are different. You need to have a look through the entire source code that's being compiled and resolve the conflict.
Hope this helps and makes sense, I've always found linker issues difficult to understand and deal with. I'd really strongly suggest reading about the linker stages of program compilation for C/C++/Objective-C code (this is a very good guide). Then you should be able to better understand what's going on under the hood! :)
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.
Sorry I know this has been covered all over the place, only I can't fix this to save my life.
If someone could explain clearly what I might have done and what I might be able to do to fix this I would be forever grateful.
Here is my error:
Command /Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
ld: duplicate symbol _OBJC_IVAR_$_sunnyHillsTL._tileMap in /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos/libcocos2d libraries.a(sunnyHillsTL.o) and /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Intermediates/workingTitle.build/Debug-iphoneos/workingTitle.build/Objects-normal/armv7/sunnyHillsTL.o
Ld /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos/workingTitle.app/workingTitle normal armv7
cd "/Users/kahanejosh/Documents/iPhone:Mac Dev/Working Title/workingTitle"
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv PATH "/Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin:/Xcode 4/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
"/Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2" -arch armv7 -isysroot "/Xcode 4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk" -L/Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos -F/Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos -filelist /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Intermediates/workingTitle.build/Debug-iphoneos/workingTitle.build/Objects-normal/armv7/workingTitle.LinkFileList -dead_strip -all_load -ObjC -miphoneos-version-min=3.0 -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -o /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos/workingTitle.app/workingTitle
ld: duplicate symbol _OBJC_IVAR_$_sunnyHillsTL._tileMap in /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Products/Debug-iphoneos/libcocos2d libraries.a(sunnyHillsTL.o) and /Users/kahanejosh/Library/Developer/Xcode/DerivedData/workingTitle-cawhuhbkmwcesmbqxvkbkbatdbze/Build/Intermediates/workingTitle.build/Debug-iphoneos/workingTitle.build/Objects-normal/armv7/sunnyHillsTL.o
collect2: ld returned 1 exit status
Command /Xcode 4/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
It looks like you have two targets set up and your source is getting used in both. So, you create a static library with the sunnyHillsTL class that gets put into libcocoas2d libraries.a and then you are using the same object file as well. Either don't directly use the class in your target (don't add the class to the target) if you're using the library, or don't have this class be compiled as part of the static library.
Seems like you have two instance variables named «tileMap» in your «sunnyHillsTL» class...
install Command Line Tools from your Xcode.
in Xcode -> Preferences -> Downloads -> Components ->Command Line Tools
I've been fighting this for a few hours now and I'm getting fed up. My project builds fine with a debug simulator build , release simulator build and a debug device build, but for some reason it won't build with a release device build. I have a static library containing my cocos2d code, and another static library containing a game engine I wrote.
Because the game engine contains categories, I had to use the all_load linker flag to get it to run. Without this flag, the code builds fine. However, I get an unrecognized selector sent to instance exception when I try to run the game.
Here's the first build error:
ld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)
Ld build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapeless normal armv6
cd /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -F/Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -filelist /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapeless.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libChipmunk.a /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a /Users/helixed/Dropbox/Documents/Development/iPhone/BlackHawk/build/Release-iphoneos/libBlackHawk.a -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework AudioToolbox -lz -framework iAd -o /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapeless
ld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
And here's the second:
Ld build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapeless normal armv7
cd /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -F/Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -filelist /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapeless.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libChipmunk.a /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a /Users/helixed/Dropbox/Documents/Development/iPhone/BlackHawk/build/Release-iphoneos/libBlackHawk.a -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework AudioToolbox -lz -framework iAd -o /Users/helixed/Dropbox/Documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapeless
ld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/Dropbox/Documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
This is the only think keeping me from releasing, so I really appreciate the help.
Thanks.
I faced a similar problem, I had accidentally included (#import) the implementation file instead of the header file
When the compiler throws an error that 2 object files contain a duplicate symbol, check for how you have included (#import) the that duplicate symbol's class in the 2 implementation files.
I had this problem with adding both Facebook sdk and Dropbox sdk. The problem was both of the SDks are using having JSON lib so I removed one of them ans it works now.
Do you have it twice in your project structure? Check the left side of XCode and look through all the folders and make sure you don't have it in there multiple times.
Do you have a different set of device architectures (armv6, armv7, etc.) in your Release build than in your Debug build settings (either project, or target which overrides project settings)?
I think the solution to your problem lies in the unrecognized selector issue that you tried to solve using the -all_load flag. I use cocos2d-iphone in a static library and didn't need that flag. If you read up what it does, it should tell you that it's unlikely to be related to your problem:
What does the -all_load linker flag do?
It fixes linking to static libraries containing ONLY categories and NO classes. That certainly isn't true for cocos2d-iphone.
I recommend to figure out why you get unrecognized selector warnings without this flag. If necessary ask another question here.
You should also turn on the "Unrecognized Selector" build warning in the project's Build Settings, so that you get this warning while compiling as opposed to when it crashes while running the game (then it's too late and you wasted a lot of time). It's one of the settings I always turn on in an Xcode project.