Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How does cpptestcli choose MSVC compiler and the purpose of compiler configuration files

Options
tweikang
tweikang Posts: 1
edited October 2023 in C/C++test

Hi all,

I am trying to understand the behaviour and relationship of cpptestcli with Microsoft Visual C++ (MSVC) compiler.

My question is:

  1. How does Parasoft choose the default MSVC compiler to use?

When specifying the compiler configuration using the -compiler property, specifying vc_14_2-64 (64 bit version of compiler) will cause the test to fail with Error: Code Analysis for TestApp/TestApp.cpp finished with code 3 (cwc). Most of the code line errors are error: invalid redeclaration of type name ___ or class template has already been defined.

My suspicion is that specifying the property -compiler vc_14_2-64 doesn't actually cause cpptestcli to invoke the 64 bit version of MSVC's cl.exe, it only tells cpptestcli to use the compiler configuration files shipped with Parasoft. Which leads me to the 2nd question.

  1. What exactly are the Parasoft compiler configuration files (under cpptest/bin/engine/etc/compilers/vc_14_2 or vc_14_2-64) used for?

Would appreciate if someone can shed some light on this!

Parasoft version used: C/C++ Standard for Windows x64 2023.1.1