Source Insight将gcc的输出结果链接到文件+行

2014-11-24 12:02:43 · 作者: · 浏览: 4

在Linux中gcc -Wall得到比较详细的编译告警信息,如下:


arm.c: In function `DispSerialMemBuf':
arm.c:93: warning: unused variable `i'
arm.c:94: warning: unused variable `ulCount'


将编译结果保存到 f:\code\list01.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,搞定