JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
The first step in analyzing a program is always to build it as a CodeSonar project. The CodeSonar build wizard makes building in Windows a straightforward process.
The CodeSonar project build system is designed so that you can base a CodeSonar project on your normal software build process. In general you will:
| Microsoft Visual Studio: |
We have provided a Visual Studio solution BasicProj.sln and
project BasicProj.vcxproj.
Your Visual Studio installation will display messages if
it does not have the SDK (or "target platform")
version or platform toolset specified in the example
project.
|
|---|---|
| Otherwise: | Start up your usual build environment and do any preparation necessary for building BasicProj.c into a software project. |
The first screen of the wizard looks like this:
CodeSonar will generate a default project name and output directory using a simple numbering scheme. You can specify your own values for these - we will call this project cs-BasicProj
| CodeSonar SaaS: | SaaS |
| otherwise: | Local |
As a shortcut, the Recent Configurations pull-down menu contains recently-used configurations. If this is your first project, there will not be any previous configurations in the menu. Once you have (successfully) built some projects, you will likely find there are certain build configurations that you use regularly and this shortcut will save you some time in setting up new projects.
The second screen of the wizard looks like this:
The Watch field indicates the programs that CodeSonar will watch in order to create the project.
CodeSonar will open a new window showing the programs that are candidates for watching.
In most cases users of such build systems will prefer the command line build. If you want to use the command line build for this tutorial, close the build wizard and choose another build option. Otherwise, continue with the remainder of this section.
In the example above the program is being built in Microsoft Visual Studio, so the MSDEV.EXE program has been selected from the list.
Once you have finished the setup steps on this screen, the wizard is ready to build the CodeSonar project by "recording" your usual build.
One or more of the following dialogs may open. If you are not sure how to resolve them, follow the links in the table for additional information.
|
Delete Files? |
|
User Account Control |
|
Service
Authentication (Requests Windows credentials for the analysis machine.) |
|
Hub
Password Authentication (Requests hub user account credentials.) If you do not have any hub account credentials, consult the hub administrator for the hub you are using. They may need to create a user account for you, or to provide you with information about an existing account that has been created for you. |
|
HTTPS Certificate |
![]()
|
Errors |
Once you have worked through the dialogs (if any), the third screen will open. It looks like this:
The wizard will display compiler messages as the build progresses. When the build is complete, the Finalize button will become active.
When you click Finalize, CodeSonar will build the project and then run the CodeSonar analysis. The degree of parallelism in the analysis will depend on the setting of ANALYSIS_SLAVES.
The fourth and final screen of the wizard informs you that the project is ready and provides some additional information.
The Project Location field specifies the location of the analysis results.
Now you can start browsing the analysis results:
The CodeSonar GUI may display a message requesting that you
sign in.
This indicates that the hub has been configured to prohibit
anonymous browsing. If so, the hub Administrator should have
informed you of your hub user account credentials.
To report problems with this documentation, please visit https://support.codesecure.com/.