Reputation: 83
I'm trying to develop an IOS application works with objC++. I am using this GUI framework for designing my GUI. But, the problem is that XCode does not seem to recognise its own library objc/runtime.h or objc_getassociatedobject methods. It is an Objective-C method and it is rather surprising that i get this error. XCode gives error No matching function to call objc_getassociatedobject
even though i #import <objc/runtime.h>
.
Upvotes: 1
Views: 2040
Reputation: 122518
objc_getAssociatedObject()
's second parameter has type const void *
, whereas you are trying to pass a NSString *
. C++ is pretty strict about implicit type conversions and it is not happy about such a conversion.
Upvotes: 1