I tried to use this code but it doesn't work. http://developer.apple.com/library/ios/#samplecode/PageControl/Introduction/Intro.html
Ld "/Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator/Dr
Ngoo.app/Dr Ngoo" normal i386
cd /Users/waitonza/Desktop/Project/Dr-Ngoo
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/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator
-F/Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator
-filelist "/Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Intermediates/Dr
Ngoo.build/Debug-iphonesimulator/Dr Ngoo.build/Objects-normal/i386/Dr
Ngoo.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 QuartzCore -framework SystemConfiguration -lsqlite3.0 -framework UIKit -framework Foundation -framework CoreGraphics -o
"/Users/waitonza/Library/Developer/Xcode/DerivedData/Dr_Ngoo-aanknxmuodcgjicaigxevljxokeq/Build/Products/Debug-iphonesimulator/Dr
Ngoo.app/Dr Ngoo"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_PagingScrollViewController", referenced from:
objc-class-ref in DrNgooAppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
The solution is the same as we've discussed in the comments:
I checked your project and it does not have PagingScrollViewController. You're probably referencing it from outside the folder. Add it to the project too and it should work fine!
#CodaFi also had the correct answer so +1 to him too!
The class PagingScrollViewController is not in your compile list. In the file tree, click your project at the top, then go to your target>build phases expand 'compile phase', then drag the PagingScrollViewController.m file to the list and run.
Related
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.
I have all the relevant frameworks added, and all relevant files are imported. In fact, if i remove the import, it gives me all the method not found errors. Any ideas how to fix this?
Ld /Users/Andrew/Library/Developer/Xcode/DerivedData/Journal-acrxfhgfvgofuyczzlzmnzunciov/Build/Products/Debug-iphonesimulator/Journal.app/Journal normal i386
cd "/Users/Andrew/Dropbox/Developer/Dear Me/Version 1.0/XCode/Journal/Journal"
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/Andrew/Library/Developer/Xcode/DerivedData/Journal-acrxfhgfvgofuyczzlzmnzunciov/Build/Products/Debug-iphonesimulator -F/Users/Andrew/Library/Developer/Xcode/DerivedData/Journal-acrxfhgfvgofuyczzlzmnzunciov/Build/Products/Debug-iphonesimulator -filelist /Users/Andrew/Library/Developer/Xcode/DerivedData/Journal-acrxfhgfvgofuyczzlzmnzunciov/Build/Intermediates/Journal.build/Debug-iphonesimulator/Journal.build/Objects-normal/i386/Journal.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 QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/Andrew/Library/Developer/Xcode/DerivedData/Journal-acrxfhgfvgofuyczzlzmnzunciov/Build/Products/Debug-iphonesimulator/Journal.app/Journal
Undefined symbols for architecture i386:
"_rectForRectWithInset", referenced from:
-[JButton drawRect:] in JButton.o
"_createRoundedRectForRect", referenced from:
-[JButton drawRect:] in JButton.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
EDIT:
From these lines of code:
CGRect borderRect = rectForRectWithInset(self.bounds, 0.5);
CGMutablePathRef borderPath = createRoundedRectForRect(borderRect, 4);
They reference a class with those methods in. It works in another project i have, with the same imports, the same referenced methods, the same imported framework.
a linker error most likely indicates that you missed to include a framework in your Build Phases of your target.
I don't know the implementation of the mentioned functions, but I assume, you missed to include either CoreGraphics or QuartzCore. And you need to import there main header-files.
I'm trying to make an app that uses Protocol Buffers. I'm getting this error, any idea why?
Ld /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest normal i386
cd /Users/fmota/Documents/Developer/Protobuf/PBTest
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/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator -F/Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator -filelist /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Intermediates/PBTest.build/Debug-iphonesimulator/PBTest.build/Objects-normal/i386/PBTest.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework SystemConfiguration -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AreaRequest_Builder", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Yes, this is a common problem I've seen.
Check out the answer to this nearly duplicate question and let me know if it solves the issue for you. :-)
Add *.pb.h and *.pb.m to "TARGET"->"Build Phases"->"Compile Sources"!
My working env is xcode 5.0.2.
Add *.pb.m to "TARGET"->"Build Phases"->"Compile Sources"
Do NOT add *.pb.h, after I added *.pb.h, it cannot link.
I am getting this error, don't know what is the solution to it
Ld /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-eibsbylnvmiovwhavrqixbxjpvbm/Build/Products/Debug-iphonesimulator/LoginTest.app/LoginTest normal i386
cd /Users/Omer/Documents/development/LoginTest
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/Omer/Library/Developer/Xcode/DerivedData/LoginTest-eibsbylnvmiovwhavrqixbxjpvbm/Build/Products/Debug-iphonesimulator -F/Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-eibsbylnvmiovwhavrqixbxjpvbm/Build/Products/Debug-iphonesimulator -filelist /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-eibsbylnvmiovwhavrqixbxjpvbm/Build/Intermediates/LoginTest.build/Debug-iphonesimulator/LoginTest.build/Objects-normal/i386/LoginTest.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -lz -framework CoreGraphics -framework Foundation -framework CFNetwork -framework SystemConfiguration -framework MobileCoreServices -framework UIKit -o /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-eibsbylnvmiovwhavrqixbxjpvbm/Build/Products/Debug-iphonesimulator/LoginTest.app/LoginTest
Undefined symbols for architecture i386:
"_GHAssertTrue", referenced from:
-[VektorViewController testAuthentication] in VektorViewController.o
"_GHAssertNil", referenced from:
-[VektorViewController testAuthentication] in VektorViewController.o
"_GHAssertFalse", referenced from:
-[VektorViewController testAuthentication] in VektorViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you are trying to build a project and not run unit tests then you need to remove the test cases from your main project. If your are building the test project then you will need to include the GHUnit project.
Ld "build/Debug-iphonesimulator/Cloudmade Map.app/Cloudmade Map" normal i386
cd /Users/MPDEV/Documents/cloudmade2
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/MPDEV/Documents/cloudmade2/build/Debug-iphonesimulator -L/Users/MPDEV/Documents/cloudmade2/libs/Proj4 -L/Users/MPDEV/Documents/cloudmade2/libs/CloudMade -L/Users/MPDEV/Documents/cloudmade2/libs/route-me -F/Users/MPDEV/Documents/cloudmade2/build/Debug-iphonesimulator -filelist "/Users/MPDEV/Documents/cloudmade2/build/cloudmade2.build/Debug-iphonesimulator/cloudmade2.build/Objects-normal/i386/Cloudmade Map.LinkFileList" -mmacosx-version-min=10.6 -lMapView -lProj4 -lCloudMadeApi -ObjC -all_load -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -lsqlite3 -framework QuartzCore -lstdc++.6 -o "/Users/MPDEV/Documents/cloudmade2/build/Debug-iphonesimulator/Cloudmade Map.app/Cloudmade Map"
Undefined symbols:
"_OBJC_CLASS_$_RMDBMapSource", referenced from:
objc-class-ref-to-RMDBMapSource in cloudmade2ViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
How do i solve this problem? I tried looking around but found no answer how to solve it.
Your target does not include RMDBMapSource.m for compile sources, and probably more files. Check that your have included all files from route-me project to your target.