PC-LINT配置使用說明

來源:互聯網
上載者:User

轉載:http://blog.yesky.com/340/xioxu/165340.shtml

PC-LINT配置使用說明

0、在http://unxutils.sourceforge.net下載win32下的tools
1、將udfserver/share/tools/unix目錄copy to C:/
2、在"我的電腦"右擊mouse選"進階"之"環境變數"之"系統變數",選"Path"
    並加入"C:/unix/usr/local/wbin/;"在路徑表項中,重啟生效。
3、在VC中整合(針對單個檔案):
    A 點擊Tools/Customize/Tools出現定製視窗
    B 在Menu contents中雙擊空白攔,輸入:pclint
    C 雙擊pclint項,在Command:中填入:pclint
      Arguments:中填入:-i"C:/unix/usr" -u std.lnt env-vc6.lnt "$(FilePath)"
      選中"Use Output Window"
    D 開啟一個項目,讓焦點位於Source Window中,點擊Tools/pclint菜單即可
4、在VC中整合(針對項目中的多個檔案):
    A 點擊Tools/Customize/Tools出現定製視窗
    B 在Menu contents中雙擊空白攔,輸入:pclint-project
    C 雙擊pclint項,在Command:中填入:find
      Arguments:中填入:$(FileDir) -name *.c | xargs pclint -i"c:/unix/usr" -u
std.lnt env-vc6.lnt
      選中"Use Output Window"
    D 開啟一個項目,讓焦點位於最項層目前的一個Source Window中,點擊Tools/pclint-
project菜單即可
5、命令列中針對項目所有檔案的pclint:
    開啟command,輸入pclint-prj <項目路徑> <輸出檔案>即可
6、增加自訂的include path方法:
    在include-path.lnt中按格式加入自已的include path即可。
7、在Source Insight中的整合:
    A 點擊Options/Custom Commands出現定製視窗
    B 點擊"Add"
    C 在New Command Name中輸入:pclint
    D 在Run中輸入:pclint -i"C:/unix/usr" -u std.lnt env-vc6.lnt %f
    E 在Pattern中輸入:^/([a-zA-Z].*/)(/([0-9][0-9]*/)).*
    F 選中"Iconic Window"及"Capture Output"及"Parse Links in Output"及"File,Then
Line",其餘不選
    E 點擊"Menu"
    F 選取Cmmand List中的"Custom Cmd: pc-lint"項,Menu中選"View",點"<End of Menu
>"後點擊"Insert",
      然後點擊"OK"退出即可
8、在Source Insight中整合(針對多個檔案)
    A、與7類似
    B、7.D中輸入變為:find %d -name *.c | xargs pclint -i"c:/unix/usr" -u std.
lnt env-vc6.lnt
    C、7.C中的輸入變為:pclint-project

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.