1、在github 上面 git clone 一个RN 项目代码,npm install (yarn)后,准备运行iOS工程,发现'config.h' file not found ,恶心!!!

百度发现:这个是常见错误,只需要在项目根目录下(里面包含node_modules文件夹)运行以下命令(下面的两行同时复制,终端运行)即可解决:

cd node_modules/react-native/third-party/glog-0.3.4

../../scripts/ios-configure-glog.sh

注意:具体的版本号要根据报错的提示来定

2、20190225 发现 'glog/logging.h' file not found 的问题(RN 版本 0.58),解决方式(参照上面的,复制下面2行,终端执行):

cd node_modules/react-native/third-party/glog-0.3.5

../../scripts/ios-configure-glog.sh

3、讨厌的错误,如下:

configure: error: C compiler cannot create executables

See `config.log' for more details

这个很是令人讨厌!!!出现的原因可能也不一致,下面列举不同时间出现的问题,解决方案和猜想。

20181123运行正常的项目,突然间就出现了config.h' file not found。按照上面的解决方式解决后,运行正常。第二天升级了mac 系统到macOS Mojave (版本10.14);Xcode 更新到Version 10.1 (10B61) 后,又出现了

configure: error: C compiler cannot create executables

See `config.log' for more details

当时百度上说是要安装 GCC 。就用:brew install gcc 安装了下最新版本的gcc 。但是安装完了之后,依然报如下错误(郁闷):

xcrun: error: SDK "iphoneos" cannot be located

xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'

configure: error: C compiler cannot create executables

See `config.log' for more details

最后有效解决方案:

打开xcode...,偏好设置 ,如下图,command line tools 要选中一个 (这个可能是当时安装了两个版本的XCODE,导致没有选择一个)。

20190313 发现glog/logging.h' file not found 问题后,按照上面20190225问题解决,却出现了 关键词如下的错误:

configure: error: C compiler cannot create executables

See `config.log' for more details

过程描述:前几天还是正常运行的,只是换了一个模拟器的机子,就出现了glog/logging.h' file not found ,按照上面的方式执行脚本,但是执行的过程中,出现了 configure: error: C compiler cannot create executables 问题。

解决方法及猜想: 1、glog/logging.h' file not found出现可能跟换模拟器有关(只是猜想)2、configure: error: C compiler cannot create executables 的出现可能跟刚才执行的另外一个RN项目有关,终端在开着另外一个RN项目的本地服务。解决方式:将终端关闭,再次运行项目,一切OK 。

React Native 'config.h' file not found 问题、 'glog/logging.h' file not found 问题、configure: error: C compiler cannot create executables问题解决过程记录的更多相关文章

  1. 安装RabbitMQ编译erlang时,checking for c compiler default output file name... configure:error:C compiler cannot create executables See 'config.log' for more details.

    checking for c compiler default output file name... configure:error:C compiler cannot create executa ...

  2. 将React Native 集成进现有OC项目中(过程记录) 、jsCodeLocation 生成方式总结

    将RN集成到现有OC项目应该是最常见的,特别是已经有OC项目的,不太可能会去专门搞个纯RN的项目.又因为RN不同版本,引用的依赖可能不尽相同,所以特别说明下,本文参考的文档是React Native ...

  3. Swift Modules for React Native

    React Native is an Objective-C application framework that bridges JavaScript applications running in ...

  4. React Native纯干货总结

    随着项目也渐渐到了尾声,之前的项目是mobile开发,采用的是React Native.为即将要开始做RN项目或者已经做过的小伙伴可以参考借鉴,也顺便自己做一下之前项目的总结. 文章比较长,可以选择自 ...

  5. React Native在window下的环境搭建(一)

    React Native官方开发文档 以下是本人抄录的: 初次接触React Native感觉和React很像,却是有点类似,但不完全是,React Native有自己的组件对象,不过它也自定义的组件 ...

  6. 深入浅出React Native 1: 环境配置

    该教程主要介绍如何用react native来开发iOS,所以首先,你需要有一台mac,当然黑苹果也是可以的~ 创建一个react native的项目只需要安装以下五个组件~~(但....坑爹的是,不 ...

  7. React Native iOS环境搭建

    前段时间React Native for Android发布,感觉React Native会越来越多的公司开始研究.使用.所以周六也抽空搭建了iOS的开发环境,以便以后利用空闲的时间能够学习一下. 废 ...

  8. [书籍精读]《React Native精解与实战》精读笔记分享

    写在前面 书籍介绍:本书由架构师撰写,包含ReactNative框架底层原理,以及与iOS.Android混合开发案例,精选了大量实例代码,方便读者快速学习.主要内容分为两大部分,第1部分" ...

  9. React Native新项目启动报错'React/RCTBridgeDelegate.h' file not found

    React Native版本:0.60.4 解决方法: cd ios pod deintegrate pod install 然后重新启动就好了(示例页面变样了( ⊙ o ⊙ )) END------ ...

随机推荐

  1. Resharper安装使用手册

    今天在博客园上看到一位大牛写了一遍关于.NET代码优化的文章,其中提到了Resharper这个工具,以前没使用过这个工具,突然想用这个工具来检查一下自己之前代码的规范程度,也是为了写出更规范的代码. ...

  2. PTA-B 1039 到底买不买 解题思路记录

    #include <cstdio> #include <string> #include <iostream> using namespace std; int m ...

  3. Python接口自动化--post提交的四种数据类型 4

    常见的post请求提交的数据类型有四种: 1.第一种:application/json:这是最常见的json格式,如下 {"input1":"XXX",&quo ...

  4. 带有function的JSON对象的序列化与还原

      JSON对象的序列化与反序列化相信大家都很熟悉了.基本的api是JSON.parse与JSON.stringify. var json={ uiModule:'http://www.a.com', ...

  5. Spark项目之电商用户行为分析大数据平台之(二)CentOS7集群搭建

    一.CentOS7集群搭建 1.1 准备3台centos7的虚拟机 IP及主机名规划如下: 192.168.123.110 spark1192.168.123.111 spark2192.168.12 ...

  6. 网站横幅切换jquery 插件

    最近做一个web项目,站点首页需要像 百度统计 页面类似的切换横幅,有兴趣的可以先看看它的效果,这样就比较容易理解为什么我单独做个插件.其实类似的 jquery 插件网上类似的多的去了,随便网上下了两 ...

  7. 封装PDO连接数据库代码

    废话不说直接上代码: <?php class DB { protected static $_connect; protected $dsn, $pdo; protected $_data, $ ...

  8. Python:基础知识

    python是一种解释型.面向对象的.带有动态语义的高级程序语言. 一.下载安装 官网下载地址:https://www.python.org/downloads 下载后执行安装文件,按照默认安装顺序安 ...

  9. Android处理ListView中的Item中的Button按钮不能点击的问题

    问题描述:ListView列表中的Button按钮按钮不能点击 解决办法:在ListView中的Item项的布局文件中加上:android:descendantFocusability="b ...

  10. ansible 变量定义和引用

    cat /etc/ansible/hosts [nodes]10.2.1.232 key=23210.2.1.43 key=43 cat debug.yaml ---- name: test how ...