ios - Defining a new interface causes "Undefined symbols for architecture x86_64:". Existing interfaces work fine -
i have ios app , using xcode version 6.3.1 (6d1002). have m file in define
@interface customobject:nsobject {} @end
and try use in viewdidload as
customobject* obj = [[customobject alloc]init];
when run this, linkage errors saying
undefined symbols architecture x86_64: "_objc_class_$_customobject", referenced from: objc-class-ref in choosealbumviewcontroller.o ld: symbol(s) not found architecture x86_64
i have similar interfaces defined other objects , continue build, link , run fine. new interfaces i'm defining failing these linkage errors. use figure out what's causing this. i'm new ios development if i'm missing information crucial figure out please let me know , i'll add it.
few flags build settings might -
build active architecture = yes
architectures = standard architecture armv7 armv64
valid architectures = arm64 armv7 armv7s
here code in define interface , try use it
@interface customalbum : nsobject { } @end @implementation choosealbumviewcontroller { } - (void)viewdidload { [super viewdidload]; customalbum* = [[customalbum alloc] init]; }
figured out, problem had defined interface had not defined implementation. adding
@implementation user @end
to .m file solved linkage issues.
thanks guys
Comments
Post a Comment