Overview

Visual Studio 2005 and 2008 are no longer supported as of v17 and later of the STEP Tools® software.

To build a STEP Tools® software application, the C++ compiler must know where the header and library files are, and what libraries to link against. The sections below describe how to do this within Visual Studio 2005 and 2008. The sample programs for each AP are also a great place to see how these are configured.

To make it easy to tell the C++ compiler where to find the STEP Tools® software header files and libraries, we use environment variables set by the STEP Tools® software installer. The ROSE variable points to the STEP Tools® software install directory, ROSE_INCLUDE points to the header file directory, and ROSE_LIB points to a preferred library directory.

Finding Header Files

Tell the compiler to look for header files in two extra directories. The first is ROSE_INCLUDE for the base STEP Tools® software headers. The second is the directory under ROSE_INCLUDE for your specific schema, such as ROSE_INCLUDE/ap203lib for the AP203 library classes. Make sure that you use the correct directory for your schema! The include directory name is listed on the page for each schema.

Within Visual Studio, right click on your project in the Solution Explorer and bring up the project's Properties dialog. We want to change the settings for both Debug and Release versions, so under the Configuration field, select "All Configurations".

Select the C/C++ category of properties and, pick the General options under that. In the Additional Include Directories property, add the semicolon-separated list of STEP Tools® software include directories. To get the value of the environment variable, use the syntax $(ROSE_INCLUDE) as shown below:

Linking To Static Libraries

Next, you must tell the linker what library files to use. We want to change the settings for both Debug and Release versions, so in the project Properties dialog, under the Configuration field, select "All Configurations".

Select the Linker category of properties and, pick the Input option under that. In the Additional Dependencies property, add the library for your schema, such as ap203lib.lib for the AP203 library classes. The correct library name is listed on the documentation page for each schema. Next, add the ROSE library rose.lib. If your program needs Part 28 XML support you must also add rosexml.lib to the list of libraries. Finally, add the advapi32.lib system library, which is needed for registry functions.

Finally, you must tell the linker where to find the library files. The STEP Tools® software Windows installation contains programming libraries built for use with Visual C++ 2005 (VC8) and 2008 (VC9) with the /MD flag, as well as versions that are link compatible with other compilers. These are kept in different subdirectories under the STEP Tools® software "lib" directory. The library directories available for Visual Studio 2005 and 2008 are as follows:

Select the Linker category of properties and, pick the General options under that. In the Additional Library Directories property, add the appropriate STEP Tools® software library directory.

Instead of an explicit subdirectory, you may use the ROSE_LIB environment variable to substitute a preferred library directory. If this variable points to a different configuration, manually change it to one of the ones above.

Check the STEP Tools® software release notes and install directory for the available versions on other platforms.

Linking To DLLs

STEP Tools® software includes both static and DLL versions of the ROSE C++ library and preinstalled schemas. The instructions above describe how to link an application with static libraries. By making a few changes to your project, you can also link to DLL versions of the libraries.

For Visual Studio 2005, the import libraries are included in the "vc8_md" library directories described above. The DLL files are located in the STEP Tools® software "dlls" directory. They use the Visual C++ 8.0 runtime and include the "i86_vc8" or "x64_vc8" symbols in their name.

For Visual Studio 2008, the import libraries are included in the "vc9_md" library directories described above. The DLL files are located in the STEP Tools® software "dlls" directory. They use the Visual C++ 9.0 runtime and include the "i86_vc9" or "x64_vc9" symbols in their name.