apple mach-o linker (id) error getting confused with this - iphone

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'

Related

clang: error: no such file or directory:

I'm trying to compile a project using OAuth2Client, I get the error:
Ld /Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator/ELance5.app/ELance5 normal i386
cd /Users/willmoss26/Documents/XCode/ELance5
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
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/iPhoneSimulator6.0.sdk -L/Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator -F/Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator -filelist /Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Intermediates/ELance5.build/Debug-iphonesimulator/ELance5.build/Objects-normal/i386/ELance5.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 /Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator/OAuth2Client/OAuth2Client -lOAuth2Client -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator/ELance5.app/ELance5
clang: error: no such file or directory: '/Users/willmoss26/Library/Developer/Xcode/DerivedData/Elance5WS-ebjkwadamxzcifcdxvdmtiiqdpoy/Build/Products/Debug-iphonesimulator/OAuth2Client/OAuth2Client'
How can I solve that?
I've already
checked User Header Search Path to include the libary
ensured Base SDK & compile settings are for iOS6 / armv7
added .framework & .a files from project to Linked Frameworks & Libraries
Thanks in advance.
Go to your Target ->Build settings ->other linker flag and see if this is done or not =>
-framework
Foundation
Go to Build Phase page of your project and expand Compile Sources to remove those files which are highlighted with red color.

Duplicate Symbol _OBJC_CLASS_$_LoginController

I know this Question has been asked many times before, but none has solved my problem uptill now. I know that this error occurs when you got multiple copies of your file in project.
I tried to clean the build, delete any LoginController.m file in Compile Sources and then build. Fine - no errors. When I added my LoginController.m file in Complie resources, compiler again gave the same error.
Next I what I tried is delete all .m files from Compile Sources, clean and rebuild successfully, and added each .m file very carefully. Again same error has been raised. I did not find any duplicate file, then why the heck is this happening?
Please someone guide me. Thanks alot.
EDIT:
Error is:
Ld /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator/TryAgain.app/TryAgain normal i386
cd /Users/svp/Desktop/TryAgain
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/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator -L/Users/svp/Desktop/TryAgain/TryAgain -L/Users/svp/Desktop/TryAgain/../CorePlot_1.0/Binaries/iOS -F/Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator -filelist /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug-iphonesimulator/TryAgain.build/Objects-normal/i386/TryAgain.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework MediaPlayer -lz -framework AVFoundation -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -lCorePlot-CocoaTouch -o /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Products/Debug-iphonesimulator/TryAgain.app/TryAgain
ld: duplicate symbol _OBJC_CLASS_$_LoginController in /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug-iphonesimulator/TryAgain.build/Objects-normal/i386/LoginController.o and /Users/svp/Library/Developer/Xcode/DerivedData/TryAgain-dhbbyywxclvxfodbunqysmmfefcl/Build/Intermediates/TryAgain.build/Debug-iphonesimulator/TryAgain.build/Objects-normal/i386/Navigator.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Your error message says that the binaries created from both LoginController.m and Navigator.m define an implementation for your LoginController class. It sometimes happens that this is because of a shared header file that contains implementation logic. Check your Navigator.h/.m for references to a LoginController.

After localization i get clang: error: linker command failed with exit code 1

I just translated my entire app into another language by adding localization to some of my nib and .m files and after I got done and I tried to run the app I get the following error.
Ld
"/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator/MDH Schedule.app/MDH Schedule" normal i386 cd
"/Users/tenghamn/Dropbox/xcode Projects/scheduleTable" 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/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator
-F/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator
-filelist "/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MDH
Schedule.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 SystemConfiguration -framework QuartzCore -framework CoreData
-framework UIKit -framework Foundation -framework CoreGraphics -o
"/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Products/Debug-iphonesimulator/MDH Schedule.app/MDH Schedule"
ld: duplicate symbol _OBJC_CLASS_$_MainViewController in
/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MainViewController-96B8D44EBB24B056.o
and
/Users/tenghamn/Library/Developer/Xcode/DerivedData/scheduleTable-djaxkjmejcrgsybqqoinnhkerlut/Build/Intermediates/scheduleTable.build/Debug-iphonesimulator/scheduleTable.build/Objects-normal/i386/MainViewController-4CC6B4B54C957278.o
for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
I have searched for solutions to this error but nothing seems to solve my issue or be directly related. Any ideas on what I can do to solve it?
I did the translation directly in the files. You need to utilize NSLocalizedstring and a strings file to make this work otherwise xcode will try to use two .m files with the same name.

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1ld: library not found for -liLibs

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.

error when integrating with XMPP into my application

When I am integrating XMPP into my application into my app I am getting an error. Please help me in solving this problem:
Build CheckOut of project CheckOut with configuration Debug
Ld build/Debug-iphonesimulator/CheckOut.app/CheckOut normal i386
cd "/Users/stellentmac1/Desktop/CheckOut 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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk "-L/Users/stellentmac1/Desktop/CheckOut 2/build/Debug-iphonesimulator" "-L/Users/stellentmac1/Desktop/CheckOut 2/../../../../../xmppframework/Vendor/libidn" "-L/Users/stellentmac1/Desktop/CheckOut 2" "-F/Users/stellentmac1/Desktop/CheckOut 2/build/Debug-iphonesimulator" -filelist "/Users/stellentmac1/Desktop/CheckOut 2/build/CheckOut.build/Debug-iphonesimulator/CheckOut.build/Objects-normal/i386/CheckOut.LinkFileList" -mmacosx-version-min=10.6 -lxml2 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CFNetwork -framework MobileCoreServices -framework SystemConfiguration -lz.1.2.3 -lresolv -o "/Users/stellentmac1/Desktop/CheckOut 2/build/Debug-iphonesimulator/CheckOut.app/CheckOut"
ld: warning: directory '/Users/stellentmac1/Desktop/CheckOut 2/../../../../../xmppframework/Vendor/libidn' following -L not found
ld: duplicate symbol _kRFSRVResolverErrorDomain in /Users/stellentmac1/Desktop/CheckOut 2/build/CheckOut.build/Debug-iphonesimulator/CheckOut.build/Objects-normal/i386/RFSRVResolver-1A90E36B7A8C9E67.o and /Users/stellentmac1/Desktop/CheckOut 2/build/CheckOut.build/Debug-iphonesimulator/CheckOut.build/Objects-normal/i386/RFSRVResolver-7299ADCEDF231192.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
This looks like a linking problem caused by a less-than careful use of the framework.
Do you have a copy of the xmppframework linked and the sources included in your project, or two copies of the sources included in your project?