AlexDenisov / iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
http://alexdenisov.github.com/iActiveRecord/
MIT License
354 stars 50 forks source link

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

Open tangyumeng opened 9 years ago

tangyumeng commented 9 years ago

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 .

mgod commented 9 years ago

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

mgod commented 9 years ago

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);\
    }\