ios - 如何在 if 包含错误条件
问题描述
在目标 c 中,如何有错误的条件#if __has_include
?
就像我试过这个
#if __has_include(!"RNFileViewerManager.h")
但它说
应为“文件名”或 <文件名>
预处理器表达式开头的标记无效
目标RNFileViewerManager
:我收到重复符号错误,如果不存在我只想加载我的代码
解决方案
使用该方法的正确方法是
#if __has_include(<frmaework/filename.h>)
something *h = [something new]
#else
other *h = [other new]
#endif
试试这个并检查你是否收到错误。
推荐阅读
- c# - 生成随机 UDID
- javascript - 为什么我的模态体中没有值传递?
- react-native - React Native:如何组合内联元素以便将它们包装在一起
- python - 将 using 语句从 c# 转换为 python
- r - 相当于 purrr::map 中的 `break`
- python - ValueError:时间数据与格式不匹配(将部分字符串转换为时间)
- python - 一致地使用平均值添加对象
- python - matplotlib set_rmax 和 set_rticks 不起作用
- java - 需要对 Manager 和 Employee 类进行编码。如何在不破坏封装的情况下使它们对彼此“可见”?
- excel - 为什么我不能从另一个工作表的数据透视表中选择第一行数据范围?