问题描述
前段时间,每次我开始一个新的 react-native 项目或安装模块时,我都会出现这个错误.
some time ago, every time I start a new project of react-native or when I install the modules I present this error.
'glog/logging.h' 文件未找到
.
我找到了解决方法
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
但是每次都运行这个很乏味.
but it is very tedious to be running this every time.
这似乎是节点的一些错误配置或类似的东西
It seems to be some bad configuration of node or something like that
推荐答案
假设您从项目根目录开始
Assuming you are starting at your projects root
cd node_modules/react-native/third-party/glog-0.3.4
sh ../../scripts/ios-configure-glog.sh
ios-configure-glog.sh
使用 ./configure
的相对路径,所以你必须先改变这个或 cd 否则它会出错.
ios-configure-glog.sh
uses a relative path to ./configure
so you have to change this or cd first or else it will error.
@jose920405 的所有道具!
All props to @jose920405!
这篇关于找不到“glog/logging.h"文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!