Overview
Visual Studio .NET is 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 .NET. 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_INCLUDE variable points to the header file directory, and the ROSE_LIB variable points to the 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, select your project in the Solution Explorer and bring up the project's Property Page 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 comma 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 and where to find them. All library files are in the directory pointed to by the ROSE_LIB environment variable.
Go to the project's Property Page dialog as described above. We want to change the settings for both Debug and Release versions, so under the Configuration field, select "All Configurations".
Select the Linker category of properties and, pick the General options under that. In the Additional Library Directories property, add the STEP Tools® software library directory. To get the value of the environment variable, use the syntax $(ROSE_LIB) as shown below:
You must link against at least two libraries. The first is the ROSE library rose.lib. The second is the library for your schema, such as ap203lib.lib for the AP203 library classes. Make sure that you use the correct library for your schema! The library name is listed on the page for each schema. If your program needs Part 28 XML support you should also add rosexml.lib to the list of libraries. Finally, add the advapi32.lib system library, which is needed for registry functions.
In the project's Property Page dialog, select the Linker category of properties and, pick the Input option under that. In the Additional Dependencies property, add the add the schema library and the ROSE library as shown below:
The STEP Tools® software Windows installation programming libraries for use with Visual C++ 6.0 with the /MD and /MT flags, which are link-compatible with VC.NET. The ROSE_LIB environment variable usually points newer versions, such as those built for Visual C++ 2005 (VC8), so you may need to change it as shown below.
To build all of your projects against a different version, change the ROSE_LIB variable. To change the version for just one project, use the ROSE environment variable, which points to the root of the STEP Tools® software installation. You can then call out a library directory explicitly. Use one of the following:
- $(ROSE)/lib/i86_win32_vc6_md
- $(ROSE)/lib/i86_win32_vc6_mt
Check the STEP Tools® software release notes and install directory for the available versions on other platforms.
Linking To DLLs
DLL versions of the ROSE C++ library and preinstalled schemas are not available for Visual Studio .NET, since this shares library versions with VC6, which has internal limits. DLLs are supported with the newer compilers, like Visual Studio 2010 and Visual Studio 2012.