Kwinjectkwinject monitors your C/C++ build to create a build specification. You can then use the build specification to analyze a Klocwork project from a C/C++ software system. Kwinject uses the --update option as its default behavior. This means if a build specification of the same name is found, running kwinject again appends to the build specification file instead of overwriting the file. See also Environment variables used by kwinject. UsageTo generate a build specification, in your build environment, run: kwinject [option...] <build-command> [arg...] To overwrite an existing build specification, run: kwinject --overwrite [option...] <build-command> [arg...] To generate a build trace, in your build environment, run: kwinject [option...] --trace-out <file> <build-command> [arg...] To convert a build trace to a build specification: kwinject [option...] --trace-in <file> To specify variables from a file to pass to kwinject: kwinject -f <variable_file> <build-command> [arg...] To integrate kwinject and project parsers (such as devenv, msbuild or msdev) to produce a full build specification: For C/C++: kwinject [option...] --enable-vcproj <build-command> [arg...] For C#: kwinject [option...] --enable-csproj <build-command> [arg...] where:
Note: If you use Visual Studio, we recommend that you run kwinject from a Visual Studio command prompt in order to more accurately capture the Visual Studio build environment settings.
If you run your build with a script When your build is run by a shell script (as with Cygwin or MKS Korn), you need to run kwinject as follows: kwinject [options] sh <shell_script> For example: kwinject sh /usr/src/xerces-c-2.5.0-1.sh Note: When running kwinject under Cygwin, it is not possible to specify a symbolic link as the command argument for kwinject.
When your build is run by a batch script, you need to run kwinject as follows: kwinject [options] cmd /c <batch_script> For example: kwinject cmd /c "my build.bat" Options
|