当前位置:网站首页>记录谷歌gn编译时碰到的一个错误“I could not find a “.gn“ file ...”
记录谷歌gn编译时碰到的一个错误“I could not find a “.gn“ file ...”
2022-08-05 01:15:00 【chexlong】
应用谷歌gn+nijia,在ubuntu7.9上编译程序时,碰到这么一个错误提示
# gn gen out/ “ERROR Can't find source root.
I could not find a ".gn" file in the current directory or any parent,
and the --root command-line argument was not specified.”

根据提示,应该是在当前目录缺少.gn文件。关键字搜索,stackoverflow上有人碰到过类似问题
selenium chromedriver - How to build with targets with Google Chromium GN? - Stack Overflow
其解决办法如下

按其步骤试了下,没用。
然后到gn demo程序里看了看,".gn"文件果然在demo程序里(注意,".gn"文件,使用ls命令查看不到,需要ll -a命令,才能查看到)

.gn文件内容为
# The location of the build configuration file.
buildconfig = "//build/BUILDCONFIG.gn"

将".gn"文件拷贝到工程当前目录,与“BUILD.gn”同一个目录,然后使用命令
gn gen out/再编译程序,“I could not find a ".gn" file ...”的错误提示就没了。
边栏推荐
- 第十一章 开关级建模
- canvas Gaussian blur effect
- Difference between MBps and Mbps
- JWT简单介绍
- GCC:头文件和库文件的路径
- AI+小核酸药物|Eleven完成2200万美元种子轮融资
- Dynamic Programming/Knapsack Problem Summary/Summary - 01 Knapsack, Complete Knapsack
- 蓝牙Mesh系统开发五 ble mesh设备增加与移除
- Knowledge Points for Network Planning Designers' Morning Questions in November 2021 (Part 1)
- GCC: paths to header and library files
猜你喜欢
随机推荐
多线程涉及的其它知识(死锁(等待唤醒机制),内存可见性问题以及定时器)
Jin Jiu Yin Shi Interview and Job-hopping Season; Are You Ready?
Method Overriding and Object Class
跨域解决方案
第十一章 开关级建模
Creative code confession
Software Testing Interview Questions: What Are the Types of Software Testing?
MBps与Mbps区别
tensor.nozero(),面具,面具
Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”
KingbaseES V8 GIS数据迁移方案(2. Kingbase GIS能力介绍)
If capturable=False, state_steps should not be CUDA tensors
The use of pytorch: temperature prediction using neural networks
sqlite--nested exception is org.apache.ibatis.exceptions.PersistenceException:
Inter-process communication and inter-thread communication
Software testing interview questions: the difference and connection between black box testing, white box testing, and unit testing, integration testing, system testing, and acceptance testing?
Software testing interview questions: What are the seven-layer network protocols?
GCC:编译时库路径和运行时库路径
新唐NUC980使用记录:在用户应用中使用GPIO
创意代码表白



![[GYCTF2020]EasyThinking](/img/40/973411c69d1e4766d22f6a4a7c7c01.png)




