Tools: pclint configuration under vc6.0 and sourceinsight

Source: Internet
Author: User

1. Introduction to lint

Lint is one of the most famous C language tools. It is a static code analysis developed by Bell Laboratory stevejohnson at 1979 on the basis of PCC (portablec compiler), which is generally provided by UNIX systems. Compared with most C language compilers, lint can perform more extensive Error Analysis on programs and is a more rigorous compilation tool. Initially, the lint tool was used to scan the C source file and warn against unportable code in the source program. But now most lint utilities have become more rigorous, which not only checks portability problems, in addition, we can check out the features that are portable and fully compliant with the syntax but are likely to be incorrect. Pclint is the lint under winodws (this text is from Baidu encyclopedia)

Ii. pclint configuration under vc6.0

If you want to configure it from the beginning, you need to download a pclint installer and make various configurations during the installation process. If you want to quickly complete the configuration, use this link (http://download.csdn.net/detail/dyx1024/7812529), because it is configured on my machine, download it, unzip it, and then follow the steps below to complete the configuration can be used directly.

1. Download this link (lint.rar in the http://download.csdn.net/detail/dyx1024/7812529 plugin, unzip to the c drive (of course, you can put it on any disk, but then you have to modify the path in the configuration file ).

2. Open the c: \ lint \ STD. LNT file and modify the path-I "d: \ Program Files \ Microsoft Visual Studio \ vc98 \ bin" to your VC installation path.

3. Open vc6.0, select Tools ---> customize... --> tools to create an item named pclint, and enter

"Command" entry: C:/lint/lint-nt.exe
"Argument" entry:-u c:/lint/STD. lnt c:/lint/env-vc6.lnt "$ (filepath )"

Then tick the use output window, for example:


4. In the menu bar tools of vc6.0, A pclint option is added. After opening a VC project, you can use this option to perform static code analysis on a single C/C ++ file, for example:


3. pclint configuration under sourceinsight:

1. Open sourceinsight, select options --> Custom commands --> Add, and enter pclint.
2. In run, enter: C:/lint-NT-UC:/lint/STD. lnt c:/lint/env-vc6.lnt % F


3. You do not need to enter the Dir field. Check the iconic window, capture output, and parse links in output options and select the file and then line options.
4. Click menu... on the right ..., in the pop-up interface, select work in the drop-down box menu (you can also select another menu), select <End of menu> in the menu cotents below, and click Insert on the right.


5. You can view the newly created pclint under the Work menu of source insight, open any source file of the project to be analyzed, and run pclint to perform static code analysis. For example


Tools: pclint configuration under vc6.0 and sourceinsight

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.