Apple Mach-O Linker Error, Objective C - iphone

I am trying to compile my application but it always has this error 'Apple Mac-O Linker Error linker command failed with exit code 1 (use -v to see invocation)' Here's the code for the error:
Ld /Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Products/Debug-iphonesimulator/Tap!.app/Tap! normal i386
cd "/Users/Sarthak/Documents/Programming/iOS and Mac OSX Programming/iOS/Tap!"
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/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Products/Debug-iphonesimulator -F/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Products/Debug-iphonesimulator -filelist /Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/Tap!.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/Tap!_dependency_info.dat -o /Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Products/Debug-iphonesimulator/Tap!.app/Tap!
duplicate symbol _OBJC_IVAR_$_tapScoreController.score in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapViewController.o
duplicate symbol _OBJC_IVAR_$_tapScoreController.gameStart in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapViewController.o
duplicate symbol _OBJC_METACLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapViewController.o
duplicate symbol _OBJC_CLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapViewController.o
duplicate symbol _OBJC_IVAR_$_tapScoreController.score in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/main.o
duplicate symbol _OBJC_IVAR_$_tapScoreController.gameStart in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/main.o
duplicate symbol _OBJC_METACLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/main.o
duplicate symbol _OBJC_CLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/main.o
duplicate symbol _OBJC_IVAR_$_tapScoreController.score in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapAppDelegate.o
duplicate symbol _OBJC_IVAR_$_tapScoreController.gameStart in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapAppDelegate.o
duplicate symbol _OBJC_METACLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapAppDelegate.o
duplicate symbol _OBJC_CLASS_$_tapScoreController in:
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapScoreController.o
/Users/Sarthak/Library/Developer/Xcode/DerivedData/Tap!-gtxtrvaffmxxtocfqejemafixgvx/Build/Intermediates/Tap!.build/Debug-iphonesimulator/Tap!.build/Objects-normal/i386/tapAppDelegate.o
ld: 12 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I figured out what was wrong, I was importing the .h file into viewController.h and view controller.m, that's why it didn't work.

Related

Creating iOS Framework

I was trying to create an iOS Framework using This Guide. I did all the things in the same way as mentioned in the tutorial but now when I'm trying to use that Framework into my sample project, I'm getting the following error.
Ld /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator/TestingFramework.app/TestingFramework normal i386
cd /Users/Ankur/Desktop/TestingFramework
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/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator -F/Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator -F/Users/Ankur/Desktop/TestingFramework/../Test/Products -filelist /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Intermediates/TestingFramework.build/Debug-iphonesimulator/TestingFramework.build/Objects-normal/i386/TestingFramework.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework TestFramework -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator/TestingFramework.app/TestingFramework
duplicate symbol _NXArgc in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol _NXArgv in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol ___progname in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol _environ in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol start in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
ld: 5 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please tell me what am I doing wrong?
Thanks
Are you perhaps using #include instead of #import somewhere?
The end result of the problem is that you including this file twice somewhere
http://iphone-dev.googlecode.com/svn/trunk/csu/crt.c

Linking error using xcode [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
Hey guys i'm try to build my app but it didn't just stoped when linking ? strange error here is the log
Ld /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO normal i386
cd /Users/alyjamy/Downloads/SearchPRO
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 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -F/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -filelist /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/SearchPRO.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lxml2 -lz -framework MobileCoreServices -framework SystemConfiguration -framework CoreGraphics -framework CFNetwork -framework UIKit -framework Foundation -o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO
duplicate symbol _OBJC_IVAR_$_Google_SearchView.refParentViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o
duplicate symbol _OBJC_CLASS_$_Google_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o
duplicate symbol _OBJC_METACLASS_$_Google_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o
duplicate symbol _OBJC_IVAR_$_HomeView.refParentViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-B126BFA53128822A.o
duplicate symbol _OBJC_CLASS_$_HomeView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-B126BFA53128822A.o
duplicate symbol _OBJC_METACLASS_$_HomeView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-5DC4F3DA47F5C55B.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/HomeView-B126BFA53128822A.o
duplicate symbol _main in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/main-90B20DF7C3920B56.o
duplicate symbol _OBJC_IVAR_$_iSearchProAppDelegate.navigationController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o
duplicate symbol _OBJC_IVAR_$_iSearchProAppDelegate.window in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o
duplicate symbol _OBJC_CLASS_$_iSearchProAppDelegate in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o
duplicate symbol _OBJC_METACLASS_$_iSearchProAppDelegate in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-FC941BF9786A1D61.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/iSearchProAppDelegate-5039F6A504D7A3A.o
duplicate symbol _OBJC_IVAR_$_Twitter_SearchView.refParentViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o
duplicate symbol _OBJC_CLASS_$_Twitter_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o
duplicate symbol _OBJC_METACLASS_$_Twitter_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-3920747535A2AD6A.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchView-F6065DBEB33D9A3C.o
duplicate symbol _OBJC_CLASS_$_Twitter_SearchViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-2A2332C99892CD6C.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-E7091C13162DBA3E.o
duplicate symbol _OBJC_METACLASS_$_Twitter_SearchViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-2A2332C99892CD6C.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Twitter_SearchViewController-E7091C13162DBA3E.o
duplicate symbol _OBJC_IVAR_$_Youtube_SearchView.refParentViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o
duplicate symbol _OBJC_CLASS_$_Youtube_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o
duplicate symbol _OBJC_METACLASS_$_Youtube_SearchView in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-1B25F11DFB82ED6E.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchView-FE4CD6F8B0DC7B2A.o
duplicate symbol _OBJC_CLASS_$_Youtube_SearchViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchViewController-3269AC039631AE5A.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchViewController-EF4F954D13CC9B2C.o
duplicate symbol _OBJC_METACLASS_$_Youtube_SearchViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchViewController-3269AC039631AE5A.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Youtube_SearchViewController-EF4F954D13CC9B2C.o
ld: 21 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
can you help me with
solved this error when i removed the duplicate now i have it
Ld /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO normal i386
cd /Users/alyjamy/Downloads/SearchPRO
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 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -F/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator -filelist /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/SearchPRO.LinkFileList -Xlinker --no-demangle -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lxml2 -lz -framework MobileCoreServices -framework SystemConfiguration -framework CoreGraphics -framework CFNetwork -framework UIKit -framework Foundation -o /Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Products/Debug-iphonesimulator/SearchPRO.app/SearchPRO
duplicate symbol _main in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/main-AC1E3FF737776656.o
ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
??
Your Youtube_SearchViewController.m and other Youtube_SearchView.m files are listed twice in your "Compile Sources" build phase.
Select your project in the Project Navigator on the left, then select your target in the list of targets, go to the "Build Phases" tab, and remove every duplicate files (so that each .m file is only listed once).
Details on how to interpret the build log (emphasis added and reformatted):
duplicate symbol _OBJC_IVAR_$_Google_SearchView.refParentViewController in:
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-F440D65BB38D9558.o
/Users/alyjamy/Library/Developer/Xcode/DerivedData/SearchPRO-byuygadvkgrdzqgiethjtvoscvzp/Build/Intermediates/SearchPRO.build/Debug-iphonesimulator/SearchPRO.build/Objects-normal/i386/Google_SearchView-41A2B8A23D2A1652.o
In the extract above, the Google_searchView.m is compiled twice, producing both Google_SearchView-F440D65BB38D9558.o and Google_SearchView-41A2B8A23D2A1652.o

iPhone's Page Control Error

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.

"Undefined symbols for architecture i386" using a static library in iOS

I'm trying to create a static library in xcode 4.2.
I'm following the steps in this tutorial. However, I get the following error:
Ld /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator/Testlib.app/Testlib normal i386
cd /Users/harishk/Desktop/sl/Testlib
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/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator -L/Users/harishk/Desktop/sl/Testlib/Testlib/lib -L/Users/harishk/Desktop/sl/Testlib/../lib -L/Users/harishk/Desktop/sl/Testlib -F/Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator -filelist /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Intermediates/Testlib.build/Debug-iphonesimulator/Testlib.build/Objects-normal/i386/Testlib.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -objC -all_load -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework UIKit -framework Foundation -framework CoreGraphics -lSimpleLibrary -o /Users/harishk/Library/Developer/Xcode/DerivedData/Testlib-ailufzhcoulmzrflyhfgbwqbiksx/Build/Products/Debug-iphonesimulator/Testlib.app/Testlib
ld: warning: ignoring file /Users/harishk/Desktop/sl/lib/libSimpleLibrary.a, file was built for archive which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MathFunctions", 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)
The MathFunctions class is missing. Either from your application project or from the SimpleLibrary.a that you use. Make sure it is part of the compilation and linking steps of your build.

Undefined symbols for architecture i386 using protobuf

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.