source insight 集成VC6.0 编译功能、pc-lint在si和vc下配置

本文介绍如何在SourceInsight中集成VC6.0的编译功能,并配置pc-lint进行代码检查,包括编译项目、清理构建、编译文件、运行项目等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、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.youkuaiyun.com/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)

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值