Understanding Build Configurations

This guide discusses Rhino C/C++ plugin build configurations and how to use them.

Overview

Visual Studio’s Build Configurations provide a way to store multiple versions of solution and project properties. The active configuration can be quickly accessed and changed, allowing you to easily build multiple configurations of the same project.

By default, standalone C/C++ projects created with Visual Studio include Debug and Release configurations. Debug configurations are automatically configured for debugging an application, and Release configurations are configured for the final release of an application.

NOTE: You can switch between Release and Debug build configurations by using Visual Studio’s Standard toolbar or the Configuration Manager dialog.

Plugin Build Configurations

The Rhino C/C++ SDK provides all of the tools (C/C++ header and library files) necessary to build plugins that can be used by Rhino. In addition to this, the Rhino SDK includes a true debug build of Rhino (Rhino.exe). The debug version of Rhino is installed in the SDK installation folder.

In order to take advantage of the inclusion of debug Rhino, the build configurations created by the Rhino Plugin Wizard are somewhat different than what is described above. Projects created with the Rhino Plugin AppWizard include Debug, DebugRhino, and Release configurations. Debug and DebugRhino configurations are automatically configured for debugging an application, and Release configurations are configured for the final release of an application.

  • The Debug project is a Release project that disables optimizations and generates debugging information using the compiler’s Program Database (/Zi) option and the linker’s Generate Debug Information (/DEBUG) option. These option settings allow you to use the debugger while you are developing your custom plugin. The Debug configuration also links with release runtime libraries. Plugins built with the Debug configuration will only load in release Rhino.
  • The Release configuration of your program contains no symbolic debug information and is fully optimized. Debug information can be generated in PDB Files (C/C++) depending on the compiler options used. Creating PDB files can be very useful if you later need to debug your release version. The Release configuration also links with release runtime libraries. Plugins built with the Release configuration will only load in release Rhino.
  • The DebugRhino configuration of your program is compiled with full symbolic debug information and no optimization. Optimization complicates debugging, because the relationship between source code and generated instructions is more complex. The DebugRhino configuration also links with debug runtime libraries. Plugins built with the DebugRhino configuration will only load in debug Rhino.

You can switch between Debug, Release, and DebugRhino build configurations by using Visual Studio’s Standard toolbar or the Configuration Manager dialog.

IMPORTANT

The build configurations in plugin projects generated by the Rhino Plugin Wizard have changed between Rhino 5 and Rhino 6. The Debug configuration in Rhino 6 plugin projects is equivalent to the PseudoDebug configuration in Rhino 5 plugin projects. And, the DebugRhino configuration on Rhino 6 plugin projects is equivalent to the Debug configuration in Rhino 5 plugin projects. The Release configuration in both Rhino 6 and Rhino 5 plugin projects are identical.

Debugging Plugins

You can debug your plugin in the following build configurations:

  • Debug configuration. The advantage of debugging your plugin using the Debug configuration is that all other plugins will be loaded during the debugging session. This is because release Rhino will load all release plugins. The disadvantage of debugging your plugin using the Debug configuration is that you cannot debug into MFC, as this configuration links with release MFC libraries.
  • DebugRhino configuration. The advantage of debugging your plugin using the DebugRhino configuration is that you can debug into MFC, as this configuration links with debug MFC libraries. The disadvantage of debugging your plugin using the DebugRhino configuration is that no other plugins will be loaded during the debugging session. This is because debug Rhino can only load debug plugins.