iActiveRecord icon indicating copy to clipboard operation
iActiveRecord copied to clipboard

Too many arguments to function call, expected 0, have 3

Open tangyumeng opened this issue 10 years ago • 2 comments

In the TestSources Folder ,in issue.m file xcode6 throw an error like this http://tangyumengblog.qiniudn.com/error.png . How can I solve this .

tangyumeng avatar Nov 15 '14 03:11 tangyumeng

As a quick fix, you can set ENABLE_STRICT_OBJC_MSGSEND = NO in your build settings

mgod avatar Nov 20 '14 16:11 mgod

After some more looking, changing the setting only works if you are not building for arm64. If you want to build for arm64, you need to change the has_many_imp and belongs_to_imp to cast objc_msgSend. Something like this:

- (ARLazyFetcher *)accessor{\
        NSString *class_name = @""#relative_class"";\
        ARLazyFetcher* (*action)(id, SEL, NSString*) = (ARLazyFetcher* (*)(id, SEL, NSString*)) objc_msgSend;\
        return action(self, sel_getUid("hasManyRecords:"), class_name);\
    }\

mgod avatar Nov 25 '14 17:11 mgod