Welcome 微信登录

首页 / 操作系统 / Linux / Source Insight将gcc的输出结果链接到文件+行

在Linux中gcc -Wall得到比较详细的编译告警信息,如下:arm.c: In function `DispSerialMemBuf":
arm.c:93: warning: unused variable `i"
arm.c:94: warning: unused variable `ulCount"将编译结果保存到 f:codelist01.txt 中在windows中使用source insight,如何将输出结果链接到文件+行呢?在source insight中custom commands一个,如下图相关的参数如下:命令行:Run:cmd /c type list01.txt存放list01.txt的目录Dir:F:code特别注意Pattern:^([a-zA-Z].*):([0-9][0-9]*).*其中文件名是:([a-zA-Z].*)行号是:([0-9][0-9]*)运行结果如下:Ok,搞定