Actually I build and compile my project with no problem one month age, but today I open my project and go ahead modifying something, I find there is a problem and I don’t know why!
It looks like this.
I have a class(viewController.h/viewController.m)
in viewController.h, I declare two methods
-(void) a;
-(void) b;
in viewController.m, I implement them
-(void) a
{... b()\\invoke method b; ...}
-(void) b
{...\\do something}
but when I build the project, errors occur:
Undefined symbols for architecture i386: “_b”, referenced from:
-[ViewController a] in ViewController.o
(maybe you meant: dyld_stub_binding_helper) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
How can I fix it?
Either use C functions:
viewController.h:
viewController.m:
or, you can use Objective-C methods:
viewController.h:
viewController.m: