I was following along the instructions for building tests using xcode/appcode from TDD site. I got through the initial part ok and started to experiment in my own project, but I keep getting a linking error and can't figure out where from?
The output I get is this
Ld /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator/acidplusTests.octest/acidplusTests normal i386
cd /Volumes/Defiant/Freeradical/freeradical_newacidbase/acidplus
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator -LLibs/OCMock/iOS -LLibs/OCMock/iOS/OCMock -F/Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Intermediates/acidplus.build/Debug-iphonesimulator/acidplusTests.build/Objects-normal/i386/acidplusTests.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -force_load Libs/OCMock/iOS/libOCMock.a -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreGraphics -framework SenTestingKit -framework UIKit -framework Foundation -lOCMock -o /Users/prasanth/Library/Developer/Xcode/DerivedData/acidplus-ctbnayjfiyhfxkccqyopjsnfagos/Build/Products/Debug-iphonesimulator/acidplusTests.octest/acidplusTests
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_BPG_testModelObject", referenced from:
objc-class-ref in testModelTest.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried looking at missing Sources or Linked libraries, but couldn't find anything. Anyone know what else could be wrong?
thanks!
Have you tried the following:
Go to XCode, Under Project -> do a clean and Build your solution again.
Related
I am creating a bar chart in iOS using TeleriKUi.framework but I got 3 linker error at run time.
I am using Xcode 5.
Ld /Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Products/Debug-iphonesimulator/DemoChart.app/DemoChart normal i386
cd /Users/harikant/Desktop/DemoChart
setenv IPHONEOS_DEPLOYMENT_TARGET 7.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/iPhoneSimulator7.0.sdk -L/Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Products/Debug-iphonesimulator -F/Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Intermediates/DemoChart.build/Debug-iphonesimulator/DemoChart.build/Objects-normal/i386/DemoChart.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework GameKit -framework TelerikUI -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Intermediates/DemoChart.build/Debug-iphonesimulator/DemoChart.build/Objects-normal/i386/DemoChart_dependency_info.dat -o /Users/harikant/Library/Developer/Xcode/DerivedData/DemoChart-dhiujvurrxcrawfzlfqevsxfnlkg/Build/Products/Debug-iphonesimulator/DemoChart.app/DemoChart
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_UIBlurEffect", referenced from:
objc-class-ref in TelerikUI(SideDrawerSlideInOnTop.o)
"_OBJC_CLASS_$_UIVisualEffectView", referenced from:
objc-class-ref in TelerikUI(SideDrawerSlideInOnTop.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did you link the UIKit framework in your project? Usually when you get a 'Undefined symbols for architecture' error you can copy the method which it references and paste that into Google and see what framework it came from, if that framework was not linked in your project then just add the framework and try again. In your case '_UIBlurEffect' was not found and Google tells me that it's part of the UIKit Framework from Apple.
Ld /Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Products/Debug-iphonesimulator/Radius.app/Radius normal x86_64
cd /Users/Admin/Desktop/Radius/Radius
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export 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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Products/Debug-iphonesimulator -L/Users/Admin/Desktop/Radius/Radius/Radius -F/Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Products/Debug-iphonesimulator -F/Users/Admin/Desktop/Radius/Radius/Radius -filelist /Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Intermediates/Radius.build/Debug-iphonesimulator/Radius.build/Objects-normal/x86_64/Radius.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -framework FacebookSDK -framework AssetsLibrary -Xlinker -dependency_info -Xlinker /Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Intermediates/Radius.build/Debug-iphonesimulator/Radius.build/Objects-normal/x86_64/Radius_dependency_info.dat -o /Users/Admin/Library/Developer/Xcode/DerivedData/Radius-cxycjazfyueurigdymnvyxtqwulq/Build/Products/Debug-iphonesimulator/Radius.app/Radius
ld: warning: ignoring file /Users/Admin/Desktop/Radius/Radius/Radius/AssetsLibrary.framework/AssetsLibrary, missing required architecture x86_64 in file /Users/Admin/Desktop/Radius/Radius/Radius/AssetsLibrary.framework/AssetsLibrary (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
objc-class-ref in EditProfileViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The "clang: error: linker command failed with exit code 1" usually occurs when you accidentally added(import) the implementation file(.m) in place of the header(.h) file.
Check and confirm if EditProfileViewController.m is not imported.
The error indicates that /Users/Admin/Desktop/Radius/Radius/Radius/AssetsLibrary.framework/AssetsLibrary is missing an x86_64 simulator slice.
Assuming you built that framework yourself, update it with i386 and x86_64 simulator slices (build for i386 and x86_64 and then lipo the resulting slices into the universal framework).
If you got it from a 3rd party, contact them for a version of the framework that has all the appropriate slices.
I just removed the library and its references. Cleaned the project, again added the required libraries and checked all references and linking, Build and run the project.
It worked!
I just started using cocoapods and can't figure out what the heck is going on. I've installed a library for a ViewController and keep getting the following errors:
Ld /Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Products/Debug-iphonesimulator/AMSlideMenu.app/AMSlideMenu normal i386
cd "/Users/dominikandrzejczuk/AMSlideMenu/AMSlideMenuDemo-with Storyboard"
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export 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/iPhoneSimulator7.1.sdk -L/Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Products/Debug-iphonesimulator -F/Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Products/Debug-iphonesimulator -filelist /Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Intermediates/AMSlideMenu.build/Debug-iphonesimulator/AMSlideMenu.build/Objects-normal/i386/AMSlideMenu.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework CoreGraphics -framework UIKit -framework Foundation -lPods-AMSlideMenu -Xlinker -dependency_info -Xlinker /Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Intermediates/AMSlideMenu.build/Debug-iphonesimulator/AMSlideMenu.build/Objects-normal/i386/AMSlideMenu_dependency_info.dat -o /Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Products/Debug-iphonesimulator/AMSlideMenu.app/AMSlideMenu
duplicate symbol _OBJC_METACLASS_$_AMSlideMenuContentSegue in:
/Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Intermediates/AMSlideMenu.build/Debug-iphonesimulator/AMSlideMenu.build/Objects-normal/i386/AMSlideMenuContentSegue.o
/Users/dominikandrzejczuk/Library/Developer/Xcode/DerivedData/AMSlideMenu-eqdwyqtxcitqwzavvophqeeuqgyn/Build/Products/Debug-iphonesimulator/libPods-AMSlideMenu.a(AMSlideMenuContentSegue.o)
ld: 35 duplicate symbols for architecture i386
wclang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried removing the Library path in build settings, I've tried reinstalling a pod install and pretty much every other option recommended on the web.
I have no idea where to go from here...
I have a project that uses (or would like to) the route-me (alpstein fork). I have followed the installations interaction with some limited success.
I have dragged "MapView.xcodeproj" in to my project, I have added mapview.lib, to "target dependancies" and "link binaries with libraries".
if I go to my MapViewController, i can write all my code and I get no errors when importing RMmapView.h. So the compiler is seeing the imported library, however when i build the application I get this error
d /Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Products/Debug-iphonesimulator/G4EMA.app/G4EMA normal i386
cd /Users/macuser/Dropbox/G4EMA
setenv IPHONEOS_DEPLOYMENT_TARGET 5.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/iPhoneSimulator7.0.sdk -L/Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Products/Debug-iphonesimulator -LRM -LRM/Alpstein-route-me-f06f2d0 -LRM/MapView -LRM/Proj4 -LRM/samples -LRM/Alpstein-route-me-f06f2d0/MapView -LRM/Alpstein-route-me-f06f2d0/Proj4 -LRM/Alpstein-route-me-f06f2d0/samples -LRM/MapView/Map -LRM/MapView/UnitTesting -LRM/samples/LayeredMap -LRM/samples/MapMemoryLeaksCheck -LRM/samples/MapTestbed -LRM/samples/MapTestbedFlipMaps -LRM/samples/MapTestbedTwoMaps -LRM/samples/MarkerMurder -LRM/samples/ProgrammaticMap -LRM/Alpstein-route-me-f06f2d0/MapView/Map -LRM/Alpstein-route-me-f06f2d0/MapView/UnitTesting -LRM/Alpstein-route-me-f06f2d0/samples/LayeredMap -LRM/Alpstein-route-me-f06f2d0/samples/MapMemoryLeaksCheck -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbed -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbedFlipMaps -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbedTwoMaps -LRM/Alpstein-route-me-f06f2d0/samples/MarkerMurder -LRM/Alpstein-route-me-f06f2d0/samples/ProgrammaticMap -LRM/MapView/Map/FMDB -LRM/MapView/Map/Resources -LRM/MapView/Map/SMCalloutView -LRM/samples/LayeredMap/Classes -LRM/samples/MapMemoryLeaksCheck/Classes -LRM/samples/MapTestbed/Classes -LRM/samples/MapTestbedFlipMaps/Classes -LRM/samples/MapTestbedTwoMaps/Classes -LRM/samples/MarkerMurder/Classes -LRM/samples/ProgrammaticMap/Classes -LRM/Alpstein-route-me-f06f2d0/MapView/Map/FMDB -LRM/Alpstein-route-me-f06f2d0/MapView/Map/Resources -LRM/Alpstein-route-me-f06f2d0/MapView/Map/SMCalloutView -LRM/Alpstein-route-me-f06f2d0/samples/LayeredMap/Classes -LRM/Alpstein-route-me-f06f2d0/samples/MapMemoryLeaksCheck/Classes -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbed/Classes -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbedFlipMaps/Classes -LRM/Alpstein-route-me-f06f2d0/samples/MapTestbedTwoMaps/Classes -LRM/Alpstein-route-me-f06f2d0/samples/MarkerMurder/Classes -LRM/Alpstein-route-me-f06f2d0/samples/ProgrammaticMap/Classes -F/Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Products/Debug-iphonesimulator -filelist /Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Intermediates/G4EMA.build/Debug-iphonesimulator/G4EMA.build/Objects-normal/i386/G4EMA.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -objc,-all_load -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 /Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Products/Debug-iphonesimulator/libMapView.a -lz -framework SystemConfiguration -lsqlite3 -framework QuartzCore -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Intermediates/G4EMA.build/Debug-iphonesimulator/G4EMA.build/Objects-normal/i386/G4EMA_dependency_info.dat -o /Users/macuser/Library/Developer/Xcode/DerivedData/G4EMA-djubtvaxtspjxbbolnkeaoatnyqd/Build/Products/Debug-iphonesimulator/G4EMA.app/G4EMA
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RMTileImage", referenced from:
objc-class-ref in libMapView.a(RMMapTiledLayerView.o)
"_RMTileDummy", referenced from:
-[RMFractalTileProjection normaliseTile:] in libMapView.a(RMFractalTileProjection.o)
"_RMTileKey", referenced from:
+[RMTileCache tileHash:] in libMapView.a(RMTileCache.o)
-[RMAbstractWebMapSource imageForTile:inCache:] in libMapView.a(RMAbstractWebMapSource.o)
___47-[RMAbstractWebMapSource imageForTile:inCache:]_block_invoke in libMapView.a(RMAbstractWebMapSource.o)
___47-[RMAbstractWebMapSource imageForTile:inCache:]_block_invoke108 in libMapView.a(RMAbstractWebMapSource.o)
___42-[RMCompositeSource imageForTile:inCache:]_block_invoke in libMapView.a(RMCompositeSource.o)
___42-[RMCompositeSource imageForTile:inCache:]_block_invoke_2 in libMapView.a(RMCompositeSource.o)
"_RMTileMake", referenced from:
-[RMMapTiledLayerView drawLayer:inContext:] in libMapView.a(RMMapTiledLayerView.o)
-[RMTileCache beginBackgroundCacheForTileSource:southWest:northEast:minZoom:maxZoom:] in libMapView.a(RMTileCache.o)
___85-[RMTileCache beginBackgroundCacheForTileSource:southWest:northEast:minZoom:maxZoom:]_block_invoke_2 in libMapView.a(RMTileCache.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am truly at a loss as to why this is happening, my Research on s/o has drawn a blank so any information or pointers would be appreciated.
I have looked through other questions that had similar issues, but I still can't figure out what is wrong. This is my first app and the other answers didn't make much sense. I keep getting the same error:
Ld /Users/brandonpayne/Library/Developer/Xcode/DerivedData/FordyceSchools-gcczvpeftaotknfzpktdnjoqzncf/Build/Products/Debug-iphonesimulator/FordyceSchools.app/FordyceSchools normal i386
cd /Users/brandonpayne/Desktop/FordyceSchools
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/brandonpayne/Library/Developer/Xcode/DerivedData/FordyceSchools-gcczvpeftaotknfzpktdnjoqzncf/Build/Products/Debug-iphonesimulator -F/Users/brandonpayne/Library/Developer/Xcode/DerivedData/FordyceSchools-gcczvpeftaotknfzpktdnjoqzncf/Build/Products/Debug-iphonesimulator -filelist /Users/brandonpayne/Library/Developer/Xcode/DerivedData/FordyceSchools-gcczvpeftaotknfzpktdnjoqzncf/Build/Intermediates/FordyceSchools.build/Debug-iphonesimulator/FordyceSchools.build/Objects-normal/i386/FordyceSchools.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/brandonpayne/Library/Developer/Xcode/DerivedData/FordyceSchools-gcczvpeftaotknfzpktdnjoqzncf/Build/Products/Debug-iphonesimulator/FordyceSchools.app/FordyceSchools
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ViewController", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can't find in my code where the error is. Please help.