I am need of some assistance with sparrow framework(http://www.sparrow-framework.org/)/xcode 4/ and my project. I am Getting the following error:
Ld /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/iDoubtIt.app/iDoubtIt normal i386
cd /Users/alex/Dropbox/iDoubtIt/iDoubtIt-Sparrow
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator -F/Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator -filelist /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/iDoubtIt.LinkFileList -mmacosx-version-min=10.6 -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/libSparrow.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework AVFoundation -framework AudioToolbox -framework OpenAL -o /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Products/Debug-iphonesimulator/iDoubtIt.app/iDoubtIt
ld: duplicate symbol _OBJC_IVAR_$_AIPlayer.hand in /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/Game.o and /Users/alex/Library/Developer/Xcode/DerivedData/iDoubtIt-civshevejenwbzfqnllzztidnmzi/Build/Intermediates/iDoubtIt.build/Debug-iphonesimulator/iDoubtIt.build/Objects-normal/i386/ApplicationDelegate.o for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Thanks in advance.
Probably you have imported an implementation file (*.m file) in your "Game.m" or "ApplicationDelegate.m" file. You should not import implementation files. That causes your implementation file to get compiled two times. That causes duplicate symbol error.
To fix that problem you should fix your import line from foo.m to foo.h.
Related
while trying to run in Xcode 7.3.1, I am getting the following error :
Ld /Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/birdybobble\ iOS.app/birdybobble\ iOS normal i386
cd /Volumes/WORK/birdybobble/proj.ios_mac
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/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/iPhoneSimulator9.3.sdk -L/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator -Lsdkbox.framework -LPluginChartboost.framework -LChartboost.framework -LPluginAdMob.framework -LGoogleMobileAds.framework -LPluginIAP.framework -F/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator -F/Volumes/WORK/birdybobble/proj.ios_mac -filelist /Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Intermediates/birdybobble.build/Debug-iphonesimulator/birdybobble\ iOS.build/Objects-normal/i386/birdybobble\ iOS.LinkFileList -mios-simulator-version-min=8.0 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -ObjC -stdlib=libc++ -fobjc-link-runtime -lbz2.1.0 -lz.1 -framework OpenGLES -framework UIKit -framework CoreMotion -framework Security /Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/libcocos2d\ iOS.a -framework Foundation -framework CoreGraphics -framework QuartzCore -framework OpenAL -framework AVFoundation -framework AudioToolbox -framework sdkbox -framework PluginChartboost -framework Chartboost -framework StoreKit -framework AdSupport -framework SystemConfiguration -framework PluginAdMob -framework GoogleMobileAds -framework CoreMedia -framework CoreTelephony -framework EventKit -framework EventKitUI -framework MessageUI -framework GameController -framework MediaPlayer -framework PluginIAP -Xlinker -dependency_info -Xlinker /Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Intermediates/birdybobble.build/Debug-iphonesimulator/birdybobble\ iOS.build/Objects-normal/i386/birdybobble\ iOS_dependency_info.dat -o /Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/birdybobble\ iOS.app/birdybobble\ iOS
duplicate symbol _strerror$UNIX2003 in:
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Intermediates/birdybobble.build/Debug-iphonesimulator/birdybobble iOS.build/Objects-normal/i386/asd.o
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/libcocos2d iOS.a(CCImage.o)
duplicate symbol _fopen$UNIX2003 in:
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Intermediates/birdybobble.build/Debug-iphonesimulator/birdybobble iOS.build/Objects-normal/i386/asd.o
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/libcocos2d iOS.a(CCImage.o)
duplicate symbol _fwrite$UNIX2003 in:
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Intermediates/birdybobble.build/Debug-iphonesimulator/birdybobble iOS.build/Objects-normal/i386/asd.o
/Users/ecdev/Library/Developer/Xcode/DerivedData/birdybobble-hfiarbprydmxgtbmjresfgzerqom/Build/Products/Debug-iphonesimulator/libcocos2d iOS.a(CCImage.o)
ld: 3 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: 3 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If someone can help, it will be a great help !!!
Thanks in advance.
From Xcode 7.3 onwards you can you can's use any custom variable twice. If you want to use then just Go to Build Setting and search for No Common Blocks and set it NO. And build again you will not get this error again.
I'm new to IOS Development and I'm trying to Restkit via cocoapods using this tutorial with no success. I'm getting the following error:
Ld /Users/noor/Library/Developer/Xcode/DerivedData/EZ-POINT-cltwbuksnzhbqpabqekhgkzqspjw/Build/Products/Debug-iphonesimulator/EZ-POINT.app/EZ-POINT normal i386
cd /Users/noor/Documents/Apps/EZ-POINT.BK
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
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.1.sdk -L/Users/noor/Library/Developer/Xcode/DerivedData/EZ-POINT-cltwbuksnzhbqpabqekhgkzqspjw/Build/Products/Debug-iphonesimulator -F/Users/noor/Library/Developer/Xcode/DerivedData/EZ-POINT-cltwbuksnzhbqpabqekhgkzqspjw/Build/Products/Debug-iphonesimulator -filelist /Users/noor/Library/Developer/Xcode/DerivedData/EZ-POINT-cltwbuksnzhbqpabqekhgkzqspjw/Build/Intermediates/EZ-POINT.build/Debug-iphonesimulator/EZ-POINT.build/Objects-normal/i386/EZ-POINT.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CFNetwork -framework CoreData -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreLocation -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -lPods -o /Users/noor/Library/Developer/Xcode/DerivedData/EZ-POINT-cltwbuksnzhbqpabqekhgkzqspjw/Build/Products/Debug-iphonesimulator/EZ-POINT.app/EZ-POINT
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestion?
You should open your project by .xcworkspace not by .xproject :-)
Besides, I find this one might help you solve your problem
You should read this, you need a workspace, not a project http://docs.cocoapods.org/guides/integrating_a_project.html
I just check out an old project from SVN for my work and when I tried to build it, i got 6 errors.
I can't resolve 2 of 'em.
So the first one is about the Flurry library.
here is the error :
"I replaced the name of the app buy APPNAME"
Ld /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME normal i386
cd "/Users/MYNAME/Documents/Projects/APPFOLDER/APPNAME"
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/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator -F/Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Intermediates/APPNAME.build/Debug-iphonesimulator/APPNAME.build/Objects-normal/i386/APPNAME.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30100 -framework Foundation -framework UIKit -framework CoreGraphics -lsqlite3.0 -framework AddressBook -framework AddressBookUI -framework CoreLocation -framework SystemConfiguration -framework QuartzCore -framework MessageUI -lFlurryWithLocation -o /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications/Xcode.app/Contents/Developer/Library/Frameworks'
ld: library not found for -lFlurryWithLocation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried to find a solution anywhere on the web but I don't...
Then, the next error is :
GenerateDSYMFile /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app.dSYM /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME
cd "/Users/MYNAME/Documents/Projects/APPFOLDER/APPNAME"
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/Platforms/iPhoneSimulator.platform/Developer/usr/bin/dsymutil /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME -o /Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app.dSYM
error: unable to open executable '/Users/MYNAME/Library/Developer/Xcode/DerivedData/APPNAME-ewdtviqnemaxivekjlajlxqanwvm/Build/Products/Debug-iphonesimulator/APPNAME.app/APPNAME'
Can somebody help me please..?
I have no more idea..
Unless the SVN specifically included the libflurryanalytics.a library (which it probably didn't because svn sees .a files as binary files and ignores them).
Download and include the libFlurryAnalytics.a from their website and include it in your target. http://www.flurry.com/product/analytics/index.html
You can then add the file into SVN using:
svn add "libFlurryAnalytics.a" --no-ignore
I get this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GameCenterManager", referenced from:
objc-class-ref in BT_viewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My Info:
Ld /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator/LatinToGo.app/LatinToGo normal i386
cd /Users/Raoul/Downloads/latintogopro_v15_iOS
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.0.sdk -L/Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator -L/Users/Raoul/Downloads/latintogopro_v15_iOS/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine -F/Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator -F/Users/Raoul/Downloads/latintogopro_v15_iOS/BT_Objects -filelist /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Intermediates/latintogopro.build/Debug-iphonesimulator/latintogopro.build/Objects-normal/i386/LatinToGo.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -framework GameKit -lxml2.2 -framework CoreAudio -framework CoreLocation -framework Foundation -framework SystemConfiguration -weak_framework UIKit -framework MobileCoreServices -framework AVFoundation -weak_framework MessageUI -lOAuth -framework MapKit -weak_framework MediaPlayer -framework CoreGraphics -framework QuartzCore -weak_framework iAd -o /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator/LatinToGo.app/LatinToGo
Go to your project, click on Build phases, Compile sources, Add GameCenterManager.m to the list.
Hope this will help :)
Presumably your code refers to the class called GameCenterManager but your project doesn't link to the framework that defines it.
If this is a built-in framework, then link to that framework: edit the target, in the Summary scroll down to the linked frameworks, press the Plus button to add the framework.
If this is a third-party framework, they should provide instructions for linking to their framework.
I am facing linker error in Xcode, I compiled Iphone code in Mac Virtual Machine (snow leopard 10.6.6) by following instruction in it Readme file for Mac OS, It compiled successfully,
Now i have to run it in XCode but i am getting fallowing error.
ld: library not found for -llinphone
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
More detail of logs
Ld /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku /Build/Products/Debug-iphonesimulator/linphone.app/linphone normal i386
cd /Users/mac/Desktop/Iphone/linphone-iphone
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/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-L/Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-L/Users/mac/Desktop/Iphone/linphone-iphone/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins
-L/Users/mac/Desktop/Iphone/linphone-iphone/liblinphone-sdk/apple-darwin/lib
-F/Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-filelist /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Intermediates/linphone.build/Debug-iphonesimulator/linphone.build/Objects-normal/i386/linphone.LinkFileList
-mmacosx-version-min=10.6 -l linphone -l mediastreamer -Xlinker -objc_abi_version -Xlinker 2 -lssl -lcrypto
-framework Foundation -weak_framework UIKit
-framework CoreGraphics -framework CoreAudio
-framework AudioToolbox -leXosip2 -losip2
-losipparser2 -lspeex -lspeexdsp
-framework AVFoundation -framework AddressBookUI
-framework AddressBook -framework SystemConfiguration -lilbc -lmsilbc
-framework CFNetwork -lortp -lresolv -lopencore-amrwb -lopencore-amrnb -lmsamr
-o /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator/linphone.app/linphone
I googled it but could not fix it, please guide me to fix this issue,
Regards
I have also face the same issue and i have solved it by reading README file
download fresh copy of linphone from git.
Before you open your code just follow the instruction of README file.
Now open your project.
Goto BuildSetting and search "Header Search Path". In that you will find that "submodules/linphone/mediastreamer2/include" record is twice.So remove one entry.
Now you can compile your code without any error.