To build an ST-Developer 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 ST-Developer header files and libraries, we use environment variables set by the ST-Developer installer. The ROSE_INCLUDE variable points to the header file directory, and the ROSE_LIB variable points to the library directory.
Tell the compiler to look for header files in two extra directories. The first is ROSE_INCLUDE for the base ST-Developer 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 ST-Developer include directories. To get the value of the environment variable, use the syntax $(ROSE_INCLUDE) as shown below:
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 ST-Developer 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 includes Part 28 XML support you should also add p28e2.lib to the list of libraries.
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 ST-Developer 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 ST-Developer installation. You can then call out a library directory explicitly. Use one of the following:
Check the ST-Developer release notes and install directory for the available versions on other platforms.
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 2005/2008 and Visual Studio 2010.