Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Kwvcprojparser

The kwvcprojparser command provides an alternative when kwinject cannot be used to create a build specification for a Microsoft Visual Studio .NET 2003, 2005, 2008 or 2010 C/C++ project.

Usage

To generate a build specification:

kwvcprojparser <input-file> --config <config-name> [--output <output-file>]

where

  • <input-file> is the .vcproj or .sln file to process
  • <config-name> is the name of the build configuration you want to use (see the -lc and -list-configs options)
  • <output-file> allows you to specify the name and location of the build specification file. By default, it is named <vcproj-file>.out or <sln-file>.out and is saved in the current working directory.

To list valid build configurations:

kwvcprojparser <input-file> --list-configs

To list all environment variables used:

kwvcprojparser <input-file> --list-vars 

Options

Name Short name Description
--help -H display this help and exit
--version -V display version and exit
--config <config-name> -c specify build configuration to use when generating build specification. Note that if the configuration of dependent projects does not match the specified configuration, Visual Studio uses the first listed configuration for a project. As a result, kwdspparser and kwvcprojparser do not enforce the configuration name. For example, a solution file contains projects A and B, where A is the main project and depends on B. Project A has the configuration Foo, and Project B has the configurations Debug and Release. When parsing the solution file, the Klocwork parser picks the Debug configuration for Project B (since Foo was not found), and Foo for Project A.
-lc   display a list of possible build configurations in a clean form, with no other output, one configuration per line
--list-configs   display a list of possible build configurations
--list-vars -lv list all environment variables used in the project or solution (besides the Visual Studio built-in macros); clean output, one variable per line
--output <output-file> -o specify the name and location of the build specification file. By default, it is named either <vcproj-file>.out or <slnfile>.out and is saved in the current working directory. The suffix .out is appended by default.
--useenv   use PATH, INCLUDE, LIBPATH, and LIB environment variables instead of IDE paths for Visual C++ builds
--solution-file <solution-file>   explicitly specify a <solutionfile>.sln file. This is specified when kwvcprojparser cannot automatically locate your .sln file or if several .sln files exist which include your .vcproj or .vcxproj file.