许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  关于C_INCLUDES必须位于源或输出目录下的再次说明

关于C_INCLUDES必须位于源或输出目录下的再次说明

阅读数 9
点赞 0
article_banner

之前在Android N上的项目,正常编译,挪到O项目,就报这个异常,很是疑惑。

直接翻译过来,就是被include的目录,必须在源码或者输出的目录内。

Google一翻:

There are a couple of other things that can trigger this check -- I've seen both of these in practice:

1. Using $(VAR)/include in your LOCAL_C_INCLUDES, but when VAR isn't set. The build system   then gets "/include", and before this check would attempt to look at the filesystem in that location. If that happened to be present on a machine, it could end up using that inappropriately.

即你配置的变量,在编译时并没定义,为空,所以变成错误的路径了。

2. Using an absolute path to a directory within the source path. This happens when someone overzealously uses $(abspath) or similar. Instead, make sure that all of your paths are relative paths from the top of the source tree. During a build, the working directory is always at the top of the source tree.

你使用了绝对路径,导致这个警告,你应该使用相对路径。

查了自己的Android.mk,发现一个定义正好是2的情况:

 LOCAL_PATH := $(call my-dir)#TEST_PATH := $(shell pwd)/$(LOCAL_PATH) //原来配置的路径,为绝对路径 TEST_PATH := $(LOCAL_PATH)/Other

修改之后,编译正常了。这边记录下,防止类似错误。。


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删


相关文章
技术文档
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空