如何#import< NSObjCRuntime.h>使用objc_msgSend [英] How to #import <NSObjCRuntime.h> to use objc_msgSend

查看:107
本文介绍了如何#import< NSObjCRuntime.h>使用objc_msgSend的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想导入运行时的标头以使用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?

推荐答案

你需要包含< objc / message.h> (你会在 / usr / include / objc 中找到相关标题并链接到 objc /usr/lib/libobjc.dylib )library。

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.

这篇关于如何#import&lt; NSObjCRuntime.h&gt;使用objc_msgSend的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆