Override a static library's global function
- by Jason Madux
Not sure if this question belongs here or on SO, but posting here for now :)
I'm trying to override a global function defined in "StaticLib" for my iOS application but the compiler keeps giving me the duplicate symbol error.
Relevant code:
#import "MyApplication.h"
#import "StaticLib.h"
NSData* getAllData() {
NSLog(@"myGetAllData");
return nil;
}
@implementation MyApplication
...
@end
I've looked into Apple's runtime library but that all seems to be class-oriented. Any suggestions or is it just not possible to override global functions from static libraries?