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

Linker options for kwbuildproject

Linker options for kwbuildproject

This page documents options that control the Klocwork C/C++ linker, kwlinker. They can be applied to kwbuildproject through the option --add-linker-options:

kwbuildproject --tables-directory <dir> --add-linker-options <linker-options> <build_specification1> [<build_specification2>...]

To pass multiple linker options, separate them by spaces, and surround the entire string in quotation marks. For example:

--add-linker-options "--object-oriented --external-relation C:\Klocwork\relations.rel"


Verbosity and help options

Name (and short name) Description
--progress (-p) print linker progress (as percentage completed)
--verbose (-v) print verbose information about program execution, which can help to troubleshoot errors
--verbose-exec print arguments of the executed external programs

Options for specifying input and output

Name (and short name) Description
-D <obj-dir> specify the object files directory. Note that you can use multiple instances of the -D option to point to different directories.
-o <table-dir> specify the output directory for the Klocwork tables
--object-file-list <list-file> (-s) specify the file(s) containing a list of object files to process. This option can be used multiple times in one command line.
--restriction-list <file> specify a list of object files for logical error finder section. Related to incremental analysis.

Options for extra features

Option Description
--replace-path <old>=<new> This option should no longer be used; instead, use the kwbuildproject option --replace-path. See Replacing the path to your source files.

Other ways to specify object files

You can substitute <object files> with the linker option -D <object files directory> if you have placed all your object files in a specific directory. Note that you can use multiple instances of the -D option to point to different directories.

Or, you can create a file containing paths to all of your object files and use the --object-file-list <file> option to point to it.

C/C++| Java | C#