使用Visual Studio 2008进行Prefast [英] Prefast with Visual studio 2008

查看:127
本文介绍了使用Visual Studio 2008进行Prefast的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Visual Studio 2008 Professional 中启用 Prefast ?

我正在尝试编译本机c ++代码.

I am trying to compile native c++ code.

我已经尝试过以下事情,

I have tried following things,

  1. 下载的Windows SDK
  2. 设置编译器到SDK的Bin/Include/Lib路径.
  3. 为c/c ++编译添加了其他选项(/Analyze:WX-)

我相信这些步骤应该已经设置了适当的编译器以使用prefast进行静态分析.此设置实际上可用于Visual Studio2005.但是,不适用于Visual Studio 2008.

I believe these steps should have set the appropriate compiler to do static analysis using prefast. This setting actually worked with Visual Studio 2005. However it does not work with Visual Studio 2008.

总是会出现两个问题

  1. LINK:警告LNK4044:无法识别的选项'/MANIFESTUAC:level ='asInvoker'uiAccess ='false';已忽略
  2. 严重错误LNK1103:调试信息已损坏;重新编译模块
  1. LINK : warning LNK4044: unrecognized option '/MANIFESTUAC:level='asInvoker' uiAccess='false''; ignored
  2. fatal error LNK1103: debugging information corrupt; recompile module

原因1,我相信是Windows SDK无法识别/MANIFESTUAC选项.这已在Visual Studio 2008中引入. 原因2,不知道:).

Reason for 1, I believe, is Windows SDK do not identify /MANIFESTUAC option. This has been introduced with Visual Studio 2008. Reason for 2, no idea :).

最欢迎任何想法/建议/指针.

Any idea / suggestions / pointers are most welcome.

推荐答案

VS 2008具有内置的代码分析功能(FxCop和PREfast).您可以在 Project-> Properties-> Configuration Properties-> C/C ++-> Advanced->启用Build上的C/C ++代码分析中将其打开.

VS 2008 has a built-in code analysis (FxCop and PREfast). You can turn it on at Project->Properties->Configuration Properties->C/C++->Advanced->Enable Code Analysis For C/C++ on Build.

然后,您可以尝试从PREfast编译一些示例并查看警告.

Then you can try to compile some examples from PREfast and see warnings.

祝你好运!

专业版没有这样的选择:(

Professional edition has no such option :(

这篇关于使用Visual Studio 2008进行Prefast的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆