collect2: ld returned 1 exit status HELP!!!!!

Discussion in 'iPhone/iPad Programming' started by joshsroka, Feb 21, 2009.

  1. macrumors member

    Joined:
    Oct 2, 2008
    #1
    I am trying to go from a tab project to another view through a button press, what is this error refering to? Do I need another framework? thanks in advance

    Building target “PacersApp” of project “PacersApp” with configuration “Debug” — (1 error)
    cd "/Volumes/Drobo/iPhone Apps/Pacers/PacersApp"
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    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.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk "-L/Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/Debug-iphonesimulator" "-F/Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/Debug-iphonesimulator" -filelist "/Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/PacersApp.build/Debug-iphonesimulator/PacersApp.build/Objects-normal/i386/PacersApp.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o "/Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/Debug-iphonesimulator/PacersApp.app/PacersApp"
    ld: duplicate symbol .objc_class_name_UIView in /Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/PacersApp.build/Debug-iphonesimulator/PacersApp.build/Objects-normal/i386/FunRunsView.o and /Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/PacersApp.build/Debug-iphonesimulator/PacersApp.build/Objects-normal/i386/TrainingProgramView.o
    collect2: ld returned 1 exit status
    ld: duplicate symbol .objc_class_name_UIView in /Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/PacersApp.build/Debug-iphonesimulator/PacersApp.build/Objects-normal/i386/FunRunsView.o and /Volumes/Drobo/iPhone Apps/Pacers/PacersApp/build/PacersApp.build/Debug-iphonesimulator/PacersApp.build/Objects-normal/i386/TrainingProgramView.o
    collect2: ld returned 1 exit status
    Build failed (1 error)
     
  2. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    The link error is duplicate symbol name. It says that the symbol

    .objc_class_name_UIView

    is present in both FunRunsView.o and TrainingProgramView.o.

    I don't really understand how that can be. I assume that that symbol comes from the UIKit library and shouldn't be in your code. Is it possible that you have declared a class UIView in those files? At any rate there is something weird about those two source files that needs to be fixed. Is it possible that they both share a header file that is imported and declares something it shouldn't related to UIView?
     

Share This Page