Reputation: 554
i am new iPhone developer. i got this error.
Ld /Users/c4ntechnology/Library/Developer/Xcode/DerivedData/iPatientCare-azwpvvrjjoaoygfcfqiicwkyssya/Build/Products/Debug-iphonesimulator/iPatientCare.app/iPatientCare normal i386 cd /Users/c4ntechnology/Desktop/iPatientCare 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/c4ntechnology/Library/Developer/Xcode/DerivedData/iPatientCare-azwpvvrjjoaoygfcfqiicwkyssya/Build/Products/Debug-iphonesimulator -F/Users/c4ntechnology/Library/Developer/Xcode/DerivedData/iPatientCare-azwpvvrjjoaoygfcfqiicwkyssya/Build/Products/Debug-iphonesimulator -filelist /Users/c4ntechnology/Library/Developer/Xcode/DerivedData/iPatientCare-azwpvvrjjoaoygfcfqiicwkyssya/Build/Intermediates/iPatientCare.build/Debug-iphonesimulator/iPatientCare.build/Objects-normal/i386/iPatientCare.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 -lsqlite3 -framework UIKit -framework AVFoundation -framework CoreGraphics -o /Users/c4ntechnology/Library/Developer/Xcode/DerivedData/iPatientCare-azwpvvrjjoaoygfcfqiicwkyssya/Build/Products/Debug-iphonesimulator/iPatientCare.app/iPatientCare
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)"_OBJC_CLASS_$_ViewController", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
please help me
Upvotes: 3
Views: 3478
Reputation: 22968
This compiler error means your AppDelegate
class is referencing the ViewController
class in your project, but the ViewController
isn't currently set up to be compiled and included in the final product.
To make sure the ViewController
class is included in the final product, select the blue Xcode project icon in the upper left column like shown in the image below:
Then select your target in the next column over, then select the Build Phases
tab, and make sure ViewController.m
is included in the list along with AppDelegate.m
and others like shown. To add it if it's not currently there, you can drag the icon of it in the very leftmost column and drop it into the Compile Sources table view, or click the + button at the bottom of that table view.
Upvotes: 5
Reputation: 6749
The UIKit class is called UIViewController
, you are most likely missing the "UI" part. You have to import <UIKit/UIKit.h>
to use this class, but it is most likely already included in your MyApp-Prefix.pch
. If ViewController is a class of your own, you must:
#import "ViewController.h"
Upvotes: 0