C 如何从Windows 7的命令行运行PVS Studio?

C 如何从Windows 7的命令行运行PVS Studio?,c,pvs-studio,C,Pvs Studio,我是PVS工作室的新手。我已经在独立模式下安装了它(没有VisualStudio)。我想从Windows 7 Professional 64位的命令行(从Cygwin64终端)运行PVS Studio。我只想静态分析一个文件“main.c”。我使用官方文件:。我想检查位于测试文件“main.c”中的简单代码段: #include <stdio.h> int main(void) { int a = 1; int b = 2; printf("%s: test

我是PVS工作室的新手。我已经在独立模式下安装了它(没有VisualStudio)。我想从Windows 7 Professional 64位的命令行(从Cygwin64终端)运行PVS Studio。我只想静态分析一个文件“main.c”。我使用官方文件:。我想检查位于测试文件“main.c”中的简单代码段:

#include <stdio.h>

int main(void)
{
    int a = 1;
    int b = 2;
    printf("%s: test message; 'a': '%d'; 'b': '%d'\n",
        __FUNCTION__, a, b, (a + b));
    return 0;
}
文件“PVS Studio.cfg”的内容:

vcinstalldir = C:\all\soft\mingw\bin\gcc.exe
platform = x64
preprocessor = gcc
language = C
文件“output.txt”的内容:

Viva64-EM
<#~>full
<#~>1
<#~>c:\all\projects\c\pvs_studio\2\main.c
<#~>error
<#~>V008
<#~>Unable to start the analysis on this file. Preprocessor exit code: 1.
<#~>false
<#~>0
<#~><#~><#~><#~>
Viva64 EM
满的
1.
c:\all\projects\c\pvs\u studio\2\main.c
错误
V008
无法对此文件启动分析。预处理器退出代码:1。
假的
0

出现错误“V008”。如何修复此错误?我已经阅读了以下文档:,但不明白哪里有错误?

尝试将“vcinstalldir”设置为“C:\all\soft\mingw\bin”-此参数应指向编译器的安装目录,而不是编译器的完整路径。如果在此之后仍然存在V008错误,请检查analyzer的process stdErr,它应该包含有关预处理失败原因的其他信息

或者,您可以自己运行预处理,并通过“i-file”参数将生成的预处理文件传递给分析器。在这种情况下,您还应该在配置中传递'skip cl exe=yes'。这种方式允许您自己控制预处理。

“如何运行”不是一个问题,而是一个名词短语。
Viva64-EM
<#~>full
<#~>1
<#~>c:\all\projects\c\pvs_studio\2\main.c
<#~>error
<#~>V008
<#~>Unable to start the analysis on this file. Preprocessor exit code: 1.
<#~>false
<#~>0
<#~><#~><#~><#~>