Note that there are some explanatory texts on larger screens.

plurals
  1. POUndefined symbols for architecture i386 with custom subclass
    primarykey
    data
    text
    <p>I'm new in Xcode development and recently found some weird case during my project development, just wonder what if some one can help me on this, below is the error that I got when I tried to build/run:</p> <pre><code>Ld /Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator/ACE.app/ACE normal i386 cd /Users/ACE/Documents/Development/Products/ACE4 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/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator -L/Users/ACE/Documents/Development/Products/ACE4/Classes/SUP/libs/Debug-iphonesimulator -F/Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator -filelist "/Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Intermediates/ACE.build/Debug-iphonesimulator/ACE Simulator.build/Objects-normal/i386/ACE.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -lz.1.2.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AddressBook -framework CoreFoundation -framework QuartzCore -framework Security -lstdc++ -licucore.A -lclientrt -lMO -lSUPObj -framework MapKit -o /Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator/ACE.app/ACE Undefined symbols for architecture i386: "_OBJC_CLASS_$_TransportMAPView", referenced from: objc-class-ref in TransportViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) </code></pre> <p>this error always appear when I tried to create an object using my custom class which is subclass from UIViewController</p> <pre><code>CustomViewController *customView = [[CustomViewController alloc] init]; </code></pre> <p>and the weird thing is the error will gone and work perfectly if I use UIViewController directly</p> <pre><code>UIViewController *customView = [[UIViewController alloc] init]; </code></pre> <p>below is the other error when I use custom class from UIButton:</p> <pre><code>Ld /Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator/ACE.app/ACE normal i386 cd /Users/ACE/Documents/Development/Products/ACE4 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/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator -L/Users/ACE/Documents/Development/Products/ACE4/Classes/SUP/libs/Debug-iphonesimulator -F/Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator -filelist "/Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Intermediates/ACE.build/Debug-iphonesimulator/ACE Simulator.build/Objects-normal/i386/ACE.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -lz.1.2.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AddressBook -framework CoreFoundation -framework QuartzCore -framework Security -lstdc++ -licucore.A -lclientrt -lMO -lSUPObj -framework MapKit -o /Users/ACE/Library/Developer/Xcode/DerivedData/ACE-ayqohtkcbgquxjgnnsbnwcketmir/Build/Products/Debug-iphonesimulator/ACE.app/ACE Undefined symbols for architecture i386: "_OBJC_CLASS_$_AceButton", referenced from: objc-class-ref in TransportViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) </code></pre> <p>and this is my custom class:</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; @interface AceButton : UIButton{ NSString *identifier; } @property(nonatomic,retain) NSString *identifier; @end </code></pre> <p>in one of my View Controller method viewDidLoad()</p> <pre><code>AceButton *button1 = [[AceButton alloc] initWithFrame:frame]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload