一、source insight 集成VC6.0编译功能:
① 把工具显示出来
View -> Toolbars -> Build
② 按住Ctrl,分别点击source insight 软件中的工具按钮,打开custom command窗口
③ bulid project :
Run: "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE" %o.dsp /MAKE "all - Win32 Debug" /NORECURSE /USEENV
Dir: %j\..
其中 "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE" 是vc6的msdev.exe软件目录,%o表示si工程名字,因此si工程名要与vc工程名一致;Dir填写的是vc工程的相对位置,%j表示当前si工程的路径,这里%j\..就是上一层目录的意思啦。
④ Clean Build:
Run: "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE" %o.dsp /MAKE "all - Win32 Debug" /NORECURSE /USEENV /CLEAN
Dir: %j\..
⑤ compile file
Run: cl %f /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
Dir: %j\..
_CONSOLE是控制台工程,_MBCS是多字节和ANSI字符串的编译宏
⑥ Run Project:
Run: "C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\MSDEV.EXE" %o.dsp /MAKE "all - Win32 Debug" /NORECURSE /USEENV; .\Debug\%o.exe
Dir: %j\..
跟VC的运行按钮有点不一样,此处一定会在运行前先编译一遍。
本帖连接:
http://blog.csdn.net/rayluoluo4/article/details/42835813
参考链接:
http://www.arrizza.com/articles/msdevcommandline.html
si手册,Custom Commands->command line substitutions
二、source insight 下pc-lint 配置:
① options -> custom commands;
② Add...;
③ 自己定义命令名称;
④ Run: c:\lint\lint-nt -u -ic:\lint\myconfig std env-si %f
Dir: C:\lint
pattern: ^\([^ ]*\) \([0-9]+\)
其中-i后的是std.lnt和env-si.lnt文件所在路径,%f表示含绝对路径的文件名;pattern中填写的是两个groups,“^\([^ ]*\)”匹配的是非空字符作为文件名,“\([0-9]+\)”匹配的是数字作为行号。
三、VC下pc-lint配置:
Tools -> custom -> tool
command: C:\lint\lint-nt.exe
parameter: -u -iC:\Lint\myconfig std.lnt env-vc6.lnt $(FileName)$(FileExt)
direction: $(FileDir)