Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:buildconfigurations [2015/09/14] (current)
Line 1: Line 1:
 +====== Rhino Plug-in Build Configurations ======
 +> **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​
 +> **Summary:​** //Discusses Rhino C++ plug-in 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++ 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.
 +
 +  * The **Debug** 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 **Debug** configuration also links with debug runtime libraries.
 +  * The **Release** configuration of your program contains no symbolic debug information and is fully optimized. Debug information can be generated in PDB Files (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.
 +
 +Note, you can switch between **Release** and **Debug** build configurations by using Visual Studio'​s Standard toolbar or the Configuration Manager dialog.
 +
 +{{:​legacy:​en:​RhinoBuildConfigurations1.png}}
 +
 +=====Plug-in Build Configurations=====
 +The Rhino C++ SDK provides all of the tools (C++ header and library files) necessary to build plug-ins that can be used by Rhino. In addition to this, the Rhino SDK includes a debug build of Rhino (Rhino4_d.exe). The debug version of Rhino is installed in the same location as the production, or release, version of Rhino 4.0 (Rhino4.exe).
 +
 +In order to take advantage of the inclusion of debug Rhino, the build configurations created by the Rhino Plug-in AppWizard are somewhat different than what is described above. Projects created with the Rhino Plug-in AppWizard include **Debug**, **PseudoDebug**,​ and **Release** configurations. **Debug** and **PseudoDebug** configurations are automatically configured for debugging an application,​ and **Release** configurations are configured for the final release of an application.
 +
 +  * The **Debug** 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 **Debug** configuration also links with debug runtime libraries. Plug-ins built with the **Debug** configuration will only load in debug Rhino (Rhino4_d.exe).
 +  * The **PseudoDebug** 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 plug-in. The **PseudoDebug** configuration also links with release runtime libraries. Plug-ins built with the **PseudoDebug** configuration will only load in release Rhino (Rhino4.exe).
 +  * The **Release** configuration of your program contains no symbolic debug information and is fully optimized. Debug information can be generated in PDB Files (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. Plug-ins built with the **Release** configuration will only load in release Rhino (Rhino4.exe).
 +
 +These plug-in build configurations link with the following SDK libraries and target the following executables:​
 +
 +
 +|**Configuration**|**Rhino Lib**|**[[developer:​opennurbs:​home|opennurbs]] Lib**|**Target Executable**|
 +|Debug|Rhino4_d.lib|opennurbs_d.lib|Rhino4_d.exe|
 +|PseudoDebug|Rhino4.lib|[[developer:​opennurbs:​home|opennurbs]].lib|Rhino4.exe|
 +|Release|Rhino4.lib|[[developer:​opennurbs:​home|opennurbs]].lib|Rhino4.exe|
 +
 +Again, you can switch between **Release**,​ **PseudoDebug**,​ and **Debug** build configurations by using Visual Studio'​s Standard toolbar or the Configuration Manager dialog.
 +
 +{{:​legacy:​en:​RhinoBuildConfigurations2.png}}
 +=====Debugging Plug-ins=====
 +
 +You can debug your plug-in in the following build configurations:​
 +
 +  * **Debug** configuration. The advantage of debugging your plug-in using the **Debug** configuration is that you can debug into MFC, as this configuration links with debug MFC libraries. The disadvantage of debugging your plug-in using the **Debug** configuration is that no other plug-ins will be loaded during the debugging session. This is because debug Rhino (Rhino4_d.exe) can only load debug plug-ins.
 +  * **PseudoDebug** configuration. The advantage of debugging your plug-in using the **PseudoDebug** configuration is that all other plug-ins will be loaded during the debugging session. This is because release Rhino (Rhino4.exe) will load all release plug-ins. The disadvantage of debugging your plug-in using the **PseudoDebug** configuration is that you cannnot debug into MFC, as this configuration links with release MFC libraries.
 +
 +//<color red>​**Critical:​**</​color>//​ In order to run the debug version of Rhino (Rhino4_d.exe),​ you will need a **non-evaluation version of Rhino** installed on your system. Also, the non-evaluation version of Rhino that you are using must match your Rhino SDK version. For example, if you are using Rhino 4.0 SR7, you must also have the Rhino 4.0 SR7 SDK order to run debug Rhino.
 +
 +//<color red>​**Critical:​**</​color>//​ In order to run the debug version of Rhino (Rhino4_d.exe),​ your system must have the correct Debug libraries. To ensure this, make sure your development system is "​up-to-date"​ with all of the available Visual Studio 2005 service packs and security updates. Using Windows Updates will ensure this. Or, just select **Help -> Check for Updates** inside of Visual Studio.
 +
 +\\
 +
 +{{tag>​Developer cplusplus}}
developer/buildconfigurations.txt · Last modified: 2015/09/14 (external edit)