Creating an accurate project is one of the most important steps in getting reliable results from Understand. There are several ways to build a precise project, which are detailed below. The quickest and most reliable methods typically involve importing from Visual Studio, GCC/G++, or CMake (see video tutorials below). If those options aren’t available, you can still achieve accurate results by manually configuring your includes, macros, and overrides. Let's step through the New Project Wizard, which is designed to automatically detect import files for your project and make project creation a breeze. 


First launch Understand and select File -> New -> Project. Add the directory where your source code is located or clone a remote Git project directly into an empty directory, then continue so Understand can provide you with the best options for creating your project:


If you have any of the aforementioned options and they are readable by Understand then they will be the first options provided to you (ie., Visual Studio .sln file, compile_commands.json file, etc.). Here is an example of a project that Understand recognizes is built with CMake, and offers step-by-step instructions for generating a compile_commands.json compilation database file that Understand can use:


If you don’t want to use these options, then select the option to ‘Skip’, or if none are available, then the next screen will look like this and offer the Buildspy gcc/g++ wrapper import option:


Select 'Next', and you'll be taken to the summary of project languages that Understand can detect in the project. Here, you can select/deselect any languages you want to include or omit, as well as change any of the language compiler options with the dropdown on the righthand side:


Select 'Next' and you'll be given the option to select some starting CodeCheck checks and Bug Hunter checks to run in the background each time you analyze your project in the future:


Select 'Next', and the final step is to save your project's location on your machine and configure any final options such as portability or advanced settings before your project creation is complete:



For a visual guide on creating a new project from source, watch this video: 



Or, watch this video to see how to create a new Visual Studio project:



If you have a project that builds with CMake, here’s how to set it up in Understand:




Do you have any files in your project with custom extensions? You can configure your project to recognize and thus accurately analyze those files. Watch the short video below to see how:




That’s it, you should now have all of the necessary files that Understand needs for an accurate project. Run a complete analysis and you are ready to go.


We appreciate any feedback that you have, just send it to support@scitools.com


Note: For our Chinese customers, our Understand videos are also hosted on Bilili: https://space.bilibili.com/1431411703/channel/seriesdetail?sid=4088764