pc-lint使用中的问题

TodayIKnow 2002-12-04 09:24:12
我刚刚在vc中用pc-lint检查代码,报告说不能打开"afxtempl.h"文件,错误代码:error322 其他的文件倒是可以检查,不知为什么?
...全文
165 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
trytemp 2003-04-10
  • 打赏
  • 举报
回复
当然,欢迎所有人来交流,我的邮箱就在上面。
trytemp 2003-04-10
  • 打赏
  • 举报
回复
另:bilincsdn大侠,很想和你就pc-lint问题做更多的交流。
最近一段时间我也在琢磨这个工具,希望能共同进步。
我的邮箱是trytemp@163.com
您能发一个您的邮箱给我吗?大家方便联系。
trytemp 2003-04-10
  • 打赏
  • 举报
回复
bilincsdn大侠所言甚详,他说的是2000系统。
如果在98下,可以在autoexec.bat中加入 set include=路径,
重起后可以添加。
除此外,设置路径还可以是在pc-lint下的lset.bat文件,也是配置路径的,
可以把需要的头文件添加进去,在运行pc-lint前运行一次这个文件。
另外就是,你用的pc-lint下应该有一个config.exe,专门配置各种文件。
可以在其中找到配置路径的地方。
bilincsdn 2003-04-09
  • 打赏
  • 举报
回复
-elib(0) -wlib(0)
可以增加在env-v6。lnt文件里边
bilincsdn 2003-04-09
  • 打赏
  • 举报
回复
在windows控制面板-》系统-》高级里边设置系统变量include为所有vc头文件的路径
然后lint-nt执行参数中增加-elib(0) -wlib(0)
bilincsdn 2003-04-09
  • 打赏
  • 举报
回复
How do I tell lint where to find my compiler headers?
Use the -i option or the INCLUDE Environment Variable to designate a search path for files not found in the current directory.

How do I tell lint not to complain about my compiler headers?
Lint uses the label of "library" header to designate those headers over which a programmer has no control (such as compiler headers). By default all #includes from a foreign directory, or enclosed within < > , are considered "library." This can be modified through the use of the +libclass option, and further fine-tuned with the +/-libdir and +/-libh options. You can then use the -wlib and -elib options to control just those messages being emitted from library headers. Compiler options files distributed with PC-lint usually contain a -wlib(1) option which limits lint output from library headers to errors only (suppressing warning and informational messages).

How do I run PC-lint from inside Microsoft Visual Studio?
You can set up PC-lint as a tool. Follow the instructions from the appropriate env-vc?.lnt file. The latest files for Version 8.00 are available from Version 8.00 Patches

What is a library header?
Lint uses the designation "library" for those headers over which the programmer normally has no control -- such as compiler and third-party headers. Use the options +libclass, +/-libdir, and +/-libh to specify which headers are library. You can then use the options -wlib, -elib, and -elibsym to control lint messages caused by "library headers", without affecting the checking of your own code.

以上是网上查到的,收到启发,可以用+libdir(path1,path2,...)参数启动lint-nt,这样vc
就不会再找不到那些library header了。
呵呵
trytemp 2003-04-08
  • 打赏
  • 举报
回复
请问,现在您的pc-lint使用情况怎么样呢。
我目前也在研究使用这个工具。
能发信到trytemp@163.com
来大家一起交流一下吗?

5,225

社区成员

发帖
与我相关
我的任务
社区描述
软件工程/管理 质量管理/软件测试
功能测试压力测试安全性测试 个人社区 湖南省·长沙市
社区管理员
  • 软件测试
  • 虫无涯
  • 小博测试成长之路
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

欢迎大家加入到软件测试的社区,在这里,希望大家勇于发表自己的看法,欢迎大家分享自己在软件测试工作过程中遇到的问题以及工作经验分享。

1.想转行的小伙伴,遇到问题没有及时回复的,可以私聊小博进行反馈

2.大家对社区有好的建议,都可以在社区发帖进行反馈

推荐大家学习的软件测试入门笔记:软件测试入门学习笔记

试试用AI创作助手写篇文章吧