2

I use Microsoft Visual Studio 2015 Community Update 3 to program various software and wanted to check PVS-Studio 6.14.21489 with the free license.

But I can't get it to work from Visual Studio, all it's able to outpout is:

Failed to preprocess file "[file path].cpp": Failed to obtain a compiler version.

V008: Unable to start the analysis on this file. [file path].cpp. Failed to obtain a compiler version.

Tested with win32 and x64 on both debug and release and I get this message on all files, nothing else. Solutions are compiling sucessfuly.

I tried reinstalling the product, same effect.

Note: I use Windows 8.1 Standard edition x64, all products including Visual Studio are installed in their default folder in C:\Program Files (x86)

Any clue would be very appreciated

Many thanks

Community
  • 1
  • 1
S. Vulton
  • 23
  • 2
  • Is this repeated on any project or on a particular project? – Sergey Vasiliev Mar 21 '17 at 16:46
  • It's the same on all projects / solutions I tested. They are all in C++, I did not test C# yet. – S. Vulton Mar 21 '17 at 22:49
  • Would you please open the Developer Command Prompt for VS2015, type cl.exe there and provide us with the output? – Pasick Mar 22 '17 at 07:32
  • From de Developer Command prompt, I get this > C:\Program Files (x86)\Microsoft Visual Studio 14.0>cl.exe Compilateur d'optimisation Microsoft (R) C/C++ version 19.00.24210 pour x86 Copyright (C) Microsoft Corporation. Tous droits réservés. utilisation : cl [ option... ] nom de fichier... [ /link linkoption... ] – S. Vulton Mar 22 '17 at 18:11
  • Thank you for providing us with the output of cl.exe. It appears that PVS-Studio detects the compiler version properly using this output. To further investigate this issue, I've created a special build of PVS-Studio with extended trace capabilities. Please download it using the link http://files.viva64.com/beta/PVS-Studio_setup.exe , use it to analyze one of your projects and send us the text of the V008 warning. – Pasick Mar 23 '17 at 08:47
  • In addition, it would be also very useful, if you try to get the compiler version in the same manner, as it does PVS-Studio. To accomplish it, go to PVS-Studio settings: PVS-Studio menu in Visual Studio -> Options... -> Common Analyzer Settings and set the RemoveIntermediateFiles property to False. Once you did it, analyze your code with PVS-Studio one more time, go to a directory with a project file (.vcxproj) and find a file with a name similar to .cpp.PVS-Studio.compilerVersion.cmd. Please run this batch in a command prompt and provide us with the output. – Pasick Mar 23 '17 at 08:57
  • It would be also very useful, if you can send us the .cpp.PVS-Studio.compilerVersion.cmd file. Please send it to support@viva64.com. – Pasick Mar 23 '17 at 09:34
  • eMail sent with the requested output and cmd file. Also added in this email a screenshot of my VS version and addons – S. Vulton Mar 23 '17 at 21:03

1 Answers1

1

Thank you for a detailed explanation of the issue. It was caused by a defect in our code. We have fixed it and published a beta version of PVS-Studio with a fix. You may download it using this link. Please try it in your environment and let us know the results.

Pasick
  • 384
  • 2
  • 7