I thought to know how to declare functions inside .m files, but here I get a linker error.I declare this in the .h file:
#import <Foundation/Foundation.h>
// Other rimports
void SQLite3HelperHandle(NSError* error);
@interface SQLite3Helper : NSObject
// Method signatures
@end
Then in the .m file:
#import "SQLite3Helper.h"
void SQLite3HelperHandle(NSError* error)
{
// Method body
}
@implementation SQLite3Helper
// Methods implementation
@end
But I get a linker error.And the error has a lot of unreadable information.The only relevant thing is:
"_SQLite3HelperHandleError", referenced from:
Also, how do I declare it inline? I tried declaring it this way in the header:
extern inline void SQLite3HelperHandle(NSError* error);
And normally in the .m file:
void SQLite3HelperHandle(NSError* error);
I also tried other ways to do it, but never found the way to silent that linker error.
It should be as fast as a macro, but the function it too long to write and I prefer type checking so that's why I need an inline function.