Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to #import <NSObjCRuntime.h> to use objc_msgSend

I'd like to import runtime's header to use objc_msgSend but I'm getting:

error: NSObjCRuntime.h: No such file or directory 

Should I add something to the header search path?

like image 201
Piotr Czapla Avatar asked Feb 04 '11 09:02

Piotr Czapla


People also ask

What does howto mean?

: a practical method or instruction. the how-tos of balancing a checkbook. also : something (such as a book) that provides such instruction.

What does how-tos mean?

noun, plural how-tos. a set of step-by-step instructions for accomplishing a certain task or reaching a certain objective: a how-to for fixing a leaky faucet.

Is wikiHow reliable?

wikiHow is a trusted knowledge resource for over 150 million monthly visitors spanning 230 countries.


1 Answers

You'll need to include <objc/message.h> (you'll find the related headers in /usr/include/objc) and link to the objc (/usr/lib/libobjc.dylib) library.

like image 150
一二三 Avatar answered Sep 18 '22 08:09

一二三