./ViewController.h:9:9: fatal error: 'UIKit/UIKit.h' file not found

clang编译的两种方法

1.使用绝对路径:

clang -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk xx/xx/y.m(文件的绝对路径)

通过上述命令即可编译通过

2.修改全局变量

vim ~/.bash_profile

在终端输入i键入

alias rewriteoc=‘clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk‘

点击esc返回输入:wq退出

终端再次输入 source ~/.bash_profile 环境变量生效

再次编译成C++代码

只需要输入 rewriteoc + 文件的绝对路径

./ViewController.h:9:9: fatal error: 'UIKit/UIKit.h' file not found

原文地址:https://www.cnblogs.com/tryFighting/p/11984814.html

时间: 2024-10-11 12:35:49

./ViewController.h:9:9: fatal error: 'UIKit/UIKit.h' file not found的相关文章

fatal error: 'libxml/xmlversion.h' file not found

问题: MACOS安装scrapy时,安装lxml出现错误 In file included from src/lxml/lxml.etree.c:232: /tmp/easy_install-O2UfP7/lxml-3.4.0/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h"          ^

解决fatal error: sys/system_properties.h: No such file or directory compilation terminated.

编译的异常log: system/core/include/cutils/properties.h:22:35: fatal error: sys/system_properties.h: No such file or directory compilation terminated. make[1]: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libinput_intermediates/<strong>xxxxx</strong>

如何解决编译linux内核(解决声卡问题),遭遇fatal error: linux/limits.h: 没有那个文件或目录

最近帮一位上海的朋友搞一块小板,在ubuntu15.04 vivid上已经加载了对应了.ko驱动包 但关键是系统根本就枚举不到该声卡ALC5640,试了OpenSUSE也是一样的结果,看来是内核漏加载了什么模块. 所以准备重新编译Linux内核3.19.3,结果运行: make?menuconfig 得到错误提示: ? ? ? ? local_lim.h:38:26: fatal error: linux/limits.h ? 应该是在linux目录下找不到limits.h文件.有诸多兄弟碰到过

fatal error: openssl/sha.h: No such file or directory 解决方案

出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现- 解决方案: 使用sudo apt-get install libssl-dev来安装libssl-dev即可

mac编译openssl扩展报错 openssl.c:44:10: fatal error: &#39;openssl/evp.h&#39; file not found

解决办法 brew link openssl --force 然后 ./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config make sudo make install mac编译openssl扩展报错 openssl.c:44:10: fatal error: 'openssl/evp.h' file not found

lua.c:80:31: fatal error: readline/readline.h: No such file or directory

make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"make[2]: Entering directory `/root/lua/lua-5.3.2/src'gcc -std=gnu99 -O2 -Wa

cocos2d-x 移植到android中编译的一些问题:fatal error: Box2D/Box2D.h: No such file or directory&amp;quot;

1.fatal error: Box2D/Box2D.h: No such file or directory" 须要加入box2d库的支持,改动android.mk文件,例如以下: 查看文本打印? LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := game_shared LOCAL_MODULE_FILENAME := libgame LOCAL_SRC_FILES := hellocpp/main.cpp \

问题描述: fatal error: &#39;XCTest/XCTest.h&#39; file not found

#import 解决方法:在报错的Target中的Building settings中FRAMEWORK_SEARCH_PATHS添加$(PLATFORM_DIR)/Developer/Library/Frameworks详解:http://stackoverflow.com/questions/24275470/xctest-xctest-h-not-found-on-old-projects-built-in-xcode-6 问题描述: fatal error: 'XCTest/XCTest

编译依赖于React Native0.46.4的React Native IOS工程时,出现错误“fatal error: &#39;React/RCTEventEmitter.h&#39; file not found”

我的环境: WebStorm 2017.2Build #WS-172.3317.70, built on July 14, 2017 JRE: 1.8.0_152-release-915-b5 x86_64JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6 Xcode8.3.3(8E3004b) 网上搜索,可以解决我的问题的网址:https://stackoverflow.com/questions/41663002