error: 'LOGE' was not declared in this scope
移植了下HAL,发现编译出现如下错误
error: 'LOGE' was not declared in this scope
比较了一下android4.1的 system/core/include/cutils/log.h和android4.0的对应文件,
发现在4.1当中已经将所有的LOG宏前面加了一个字母A 。所以出现上述编译错误。
修改HAL层源码:将LOGE LOGD等等全部加个A
方法:
`grep LOG -rl .`
附上一个linux中的字符串查找替换用法:
Linux 下各种查找替换字符串的办法
2009-03-12 10:54:13| 分类: Linux |字号 订阅
1、在vi中使用的查找替换方法
利用 :s 命令可以实现字符串的替换。具体的用法包括:
:s/str1/str2/ 用字符串 str2 替换行中首次出现的字符串 str1
:s/str1/str2/g 用字符串 str2 替换行中所有出现的字符串 str1
:.,$ s/str1/str2/g 用字符串 str2 替换正文当前行到末尾所有出现的字符串 str1
:1,$ s/str1/str2/g 用字符串 str2 替换正文中所有出现的字符串 str1
:g/str1/s//str2/g 功能同上从上述替换命令可以看到:g 放在命令末尾,表示对搜索字符串的每次出现进行替换;不加 g,表示只对搜索字符串的首次出现进行替换;g 放在命令开头,表示对正文中所有包含搜索字符串的行进行替换操作。
2、在shell中使用find结合grep进行文件的替换
# find ./ -exec grep str1 ‘{}’ \; -exec sed -i.bak s/str1/str2/g ‘{}’ \;
上面命令可以在当前目录下(包括子目录)查找包含str1的文件,自动替换成str2,并且生成源文件的bak文件
3、sed Linux下批量替换多个文件中的字符串的简单方法
用sed命令可以批量替换多个文件中的字符串。
用sed命令可以批量替换多个文件中的字符串。
sed -i "s/原字符串/新字符串/g" `grep 原字符串 -rl 所在目录`
例如:我要把aaa替换为bbb,执行命令:
sed -i "s/aaa/bbb/g" 'grep aaa -rl /www'
这是目前linux最简单的批量替换字符串命令了!
具体格式如下:
sed -i "s/oldString/newString/g" `grep oldString -rl /path`
实例代码:sed -i "s/123/456/g" `grep 123 -rl /usr/aa`
sed -i "s/123/456/g" `grep 123 -rl ./`
千万注意:gerp前面的符号是Tab键上方的那个 ` ,而不是单引号!
error: 'LOGE' was not declared in this scope的更多相关文章
- c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow
c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error ...
- 【QT】error: 'SIGNAL' was not declared in this scope
error: 'SIGNAL' was not declared in this scope 未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...
- [Error] 'exit' was not declared in this scope的解决方法
新手刚开始用Linux和c++写程序,可能会出现下面的错误 error: ‘exit’ was not declared in this scope 解决方法是 添加 #include <cst ...
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...
- 编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope
Compile++ thumb : game_shared <= main.cpp jni/hellocpp/main.cpp: In function 'void Java_org_coco ...
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...
- In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope
cygwin下使用ndk编译jni时遇到的错误: /ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64 ...
- error: ‘errno’ was not declared in this scope
问题: 将一个c文件改为cpp文件,其中的perror()改用C++中的std::cerr << strerror(error) << std::endl;来替换. 重新编译文 ...
- error: ‘to_string’ was not declared in this scope
错误: error: ‘to_string’ was not declared in this scope 原因: to_string是C++11引入的新功能,旧版本编译器可能不支持它,所以要给编译器 ...
随机推荐
- jquery实现asp.net 网页鼠标所在位置
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mouseposition. ...
- ###Markdown初步学习
Markdown学习/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) *//* Author: Nicolas Hery - ...
- MarkDown中锚点的使用
在文档中创建锚点: <A NAME="ROP_ON_ARM">Davi L, Dmitrienko A, Sadeghi A R, et al. [Return-ori ...
- OC3_字符串分割
// // main.m // OC3_字符串分割 // // Created by zhangxueming on 15/6/11. // Copyright (c) 2015年 zhangxuem ...
- dubbo监控活跃线程数
telnet对应dubbo服务的ip+端口号 status -l 其中的active就是当前的活跃线程数 通过程序定时探测写入DB,再查询渲染出来就好了 监控报警,如果已经有监控平台,可以通过一定的规 ...
- HDOJ1005 数列
Problem Description A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) ...
- 九度OJ 1480 最大上升子序列和 -- 动态规划
题目地址:http://ac.jobdu.com/problem.php?pid=1480 题目描述: 一个数的序列bi,当b1 < b2 < ... < bS的时候,我们称这个序列 ...
- POJ 1050 To the Max -- 动态规划
题目地址:http://poj.org/problem?id=1050 Description Given a two-dimensional array of positive and negati ...
- Spring 官方下载地址(非Maven)
现在spring的官网停止了使用zip包下载,只能使用maven,非常的不方便,分享如下网址可以使用zip包下载,是不是方便多了!~ 下载列表如下: spring-framework-3.2.8.RE ...
- YII2框架动态创建表模型
YII2框架动态创建表模型 在YII2中,每个表对应一个model类 在开发过程中,我们在填写一个大型表单的时候,表单里有N个select下拉列表,每个下拉select来自于不同的表: 如果要在程序里 ...