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>.
Asked
Active
Viewed 1,932 times
1
Sixie
- 83
- 1
- 10
-
Possible duplicate of [How do I use objc\_setAssociatedObject/objc\_getAssociatedObject inside an object?](https://stackoverflow.com/questions/2846218/how-do-i-use-objc-setassociatedobject-objc-getassociatedobject-inside-an-object) – John Tracid Jun 07 '17 at 08:26
-
You use incorrect call to function. – John Tracid Jun 07 '17 at 08:26
-
@JohnTracid What is the correct usage? – Sixie Jun 08 '17 at 07:39
-
Check provided link. – John Tracid Jun 08 '17 at 11:33
1 Answers
1
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.
newacct
- 119,665
- 29
- 163
- 224
