C/C++ Issues

  1. How do I analyze C/C++ in Lattix?
  2. Lattix support multiple ways of analyzing C/C++ code. The Clang parser has been integrated into Lattix and can be used to analyze C/C++/Objective-C. In addition Lattix support integration with Understand for C++ and with Klocwork. Integration with Doxygen is no longer supported (though still available). Integration with Microsoft BSC toolkit is no longer supported.

  3. How do I use Understand for C++ in conjunction with Lattix?
  4. Integration with Understand for C++ allows us to provide a comprehensive and high performance solution. You simply load the "udb" generated by Understand for C++. You can obtain Understand for C++ from the following url: http://www.getunderstand.com.

  5. Can I analyze Objective-C?
  6. You can use the Clang module for analyzing Objective-C. You can also use Understand for C++ for analyzing Objective-C. Please ensure that you use the strict-analyzer option in Understand for C++. The resulting UDB file can then be loaded into Lattix for analyzing Objective-C.

  7. I am using Lattix in conjunction with Understand for C++. However, I am not able to create a project because I get the message, Understand API Library is missing.
  8. Please ensure that Understand for C++ is installed on your computer with a valid license. On Windows, please ensure that the path contains the directory (typically C:\Program Files\STI\bin\pc-win32). On Linux, please set the environment variable STI_HOME to the top of your Understand Installation.

  9. I am not able to connect to the MySql database used by Klocwork. What should I do?

    Lattix connects to the MySql database used by Klockwork to store the dependency information. By default, Klocwork uses a user name of kw without a password. Please note that the MySql user name is different from the Klocwork user name. Note that Klocwork uses different port numbers for different versions. In Klocwork 9.*, the port is 3306. Prior to that it used to be 3313.

    To verify that you have the configuration parameters correct, you should be able to connect directly to the MySql database from the command prompt as follows:

    • mysql -P 3306 -h hostname -kw dx -p
  10. How do I use Doxygen in conjunction with Lattix?
  11. Doxygen is no longer supported by Lattix.

  12. The Unused Element Report appears to show many elements that I know are used. What is going on?
  13. This question is valid for any module but generally gets asked most often for C/C++ projects. This report shows all elements that have no dependencies to them. This means that a function like main() could be marked as unused because it is probably not called from inside the program. In C/C++, it could be even more insidious because there can be multiple declarations for a single implementation for a function. Each of the declaration, if it is inside a header file, is shown in the DSM when member level is enabled. Now there will be no dependencies to these elements and all of them will show up in the Unused Element Report. It is best to think of the Unused Element Report as an initial list of elements to examine when pruning a system for obsolete elements.