当前位置:网站首页>Use of pclint in vs2013
Use of pclint in vs2013
2022-07-26 10:05:00 【bamboogz99】
What is? pclint?
pclint Is an enhanced version C++ compiler , Is a tool that performs static compilation checks , Can cooperate with others C++ The compiler uses .
step 1. install , Note that my system is 64 windows + visual studio 2013. Therefore, you should install pclint 9i edition .
Very simple installation , Remember to patch after installation , See attachment 1.
step 2. To configure .
Mainly to establish several *.lnt file , namely include.lnt, option.lnt, std.lnt.
- The first one is used to specify the main header file directory in your compiler , This is the wrong place for me , As a result, the system compilation always prompts Error 322: Unable to open include file ‘typeinfo’.
- The second file mainly indicates which errors you don't want to be displayed ,pclint There is a number for each type of error , among 0-1000 Is assigned to C Linguistic , Greater than 1000 Is aimed at c++ Of . for example , If you don't want to see 714 error , Just use -e714, Otherwise, use +e714.
- The third one mainly indicates the version of compiler and operating system , Also comes with the system config.exe The work done by the document .
Step 3. Use - This is mainly about configuration visual studio Tools for - External tools , In fact, it is to call customized *.bat file , utilize lint-nt Compile tool for the current file / Project to compile , Note that the output is assigned to VS Output box of .
for example , The build project contains the following source files , Then compile with external tools :
int _tmain(int argc, _TCHAR* argv[])
{
int i;
int a[] = { 1, 2, 3 };
int n = sizeof(a) / sizeof(int);
for (i = 0; i <= n; i++)
printf("a[%d]=%d\n", i, a[i]);
return 0;
}
The error is as follows :
--- Module: ConsoleApplication1.cpp (C++)
printf("a[%d]=%d\n", i, a[i]);
ConsoleApplication1.cpp(13): error 661: (Warning -- Possible access of out-of-bounds pointer (1 beyond end of data) by operator '[' [Reference: file ConsoleApplication1.cpp: lines 11, 12, 13])
ConsoleApplication1.cpp(11): error 831: (Info -- Reference cited in prior message)
ConsoleApplication1.cpp(12): error 831: (Info -- Reference cited in prior message)
ConsoleApplication1.cpp(13): error 831: (Info -- Reference cited in prior message)
While using VS The above out of bounds error cannot be found .
After I finish installing , The two problems encountered are (1) Tips typeinfo The file could not be found ;(2) Tips
SDKDDKVer.h Can't find . These two questions are attached 2 It's all mentioned in , But my solution is different , Because everyone's configuration environment is different .
Reference resources :
(1) https://blog.csdn.net/finewind/article/details/43482797
(2)https://blog.csdn.net/xiake001/article/details/78272900
appendix : my include.lnt file , It should be noted that I installed visual studio ultimate 2013 edition , The first three include You may be basically the same , But the last one is to check it by yourself SDKDDKVer.h Which directory is the file in .
-iC:/lint -iC:/lint/lnt -i"C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include" -i"C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/atlmfc/include" -i"C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include" -i"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/include"边栏推荐
- 苹果独占鳌头,三星大举复兴,国产手机在高端市场颗粒无收
- 30分钟彻底弄懂 synchronized 锁升级过程
- Use of tabbarcontroller
- 数通基础-Telnet远程管理设备
- Production of a-modal drag function in antui
- Yarn 'TSC' is not an internal or external command, nor is it a runnable program or batch file. The problem that the command cannot be found after installing the global package
- 汉诺塔II|汉诺塔4柱
- Opencv image processing
- [fluorescent character effect]
- Solve NPM -v sudden failure and no response
猜你喜欢

Xiaobai makes a wave of deep copy and shallow copy

万字详解“用知识图谱驱动企业业绩增长”

Principle analysis and source code interpretation of service discovery

Applet record

Sqoop【环境搭建 01】CentOS Linux release 7.5 安装配置 sqoop-1.4.7 解决警告并验证(附Sqoop1+Sqoop2最新版安装包+MySQL驱动包资源)

Common errors when starting projects in uniapp ---appid
![Uniapp common error [wxml file compilation error]./pages/home/home Wxml and using MySQL front provided by phpstudy to establish an independent MySQL database and a detailed tutorial for independent da](/img/21/5dceab9815b503f0b62d26a430d7eb.png)
Uniapp common error [wxml file compilation error]./pages/home/home Wxml and using MySQL front provided by phpstudy to establish an independent MySQL database and a detailed tutorial for independent da

Meeting OA project (III) -- my meeting (meeting seating and submission for approval)

regular expression

Session based recommendations with recurrent neural networks
随机推荐
Formwork (III)
Wechat H5 payment on WAP, for non wechat browsers
In Net 6.0
在Blazor 中自定义权限验证
Installation and use of cocoapods
Xiaobai makes a wave of deep copy and shallow copy
Interview shock 68: why does TCP need three handshakes?
2021 windows penetration of "Cyberspace Security" B module of Shandong secondary vocational group (analysis)
The use of MySQL in nodejs
【荧光字效果】
Leetcode 504. 七进制数
protobuf的基本用法
JS continuous assignment operation
Uniapp error 7 < Map >: marker ID should be a number
Vs2019 configuring opencv
Data communication foundation TCPIP reference model
Write a script that can run in Bash / shell and PowerShell
数通基础-TCPIP参考模型
Production of a-modal drag function in antui
AirTest