Getting Started : Chapter 2 Building the Libraries : Solving Library Build Problems
Solving Library Build Problems
If you are having problems building the Stingray Studio libraries, try these solutions to common problems.
Visual Studio Compilers
Make sure you are using a supported release of Visual Studio. For details, see http://www.roguewave.com/products/stingray.aspx, then click on Supported Platforms.
NOTE >> Stingray Studio libraries will not compile if the MFC source code is not installed.
Run the Build Wizard
The Build Wizard executable is in the utils directory. It can also be executed from the Program Group for the product. This executable generates the makefile for building the Stingray Studio libraries. For more information, refer to “Build Wizard.”
Stingray Studio Paths in Property Sheets
Beginning with Microsoft Visual Studio 2010, there is no longer support for global IDE directory paths, meaning that Tools| Options | VC++ Directories no longer exists. These settings have been moved to the project level as *.vcxproj file properties. To access these settings, go to Project | Properties | Configuration Properties | VC++ Directories. Please review “Migrating to MSVC 2010 or Later from Earlier Versions” for further details.
Property Sheets
To simplify setting up paths, two property sheets, <StingrayInstallDir>\Src\SS-Win32-PropSheet and <StingrayInstallDir>\Src\SS-X64-PropSheet, are now installed with Stingray Studio for use with Win32 and x64 Visual Studio 2010 projects.
Adding a Property Sheet
Property sheets are provided for all Stingray libraries and shipped samples for Visual Studio 2010 or later, but if you are adding a new project or porting an old project to Visual Studio 2010 or later, you need to add a relevant property sheet. To add our property sheet(s) to a project:
Select the Property Manager tab or go to to View | Property Manager.
Right click on the project and select Add New Project Property Sheet... or Add Existing Property Sheet.
Navigate to <stingray-installdir>\Src directory to select the desired Stingray Studio specific property sheet file.
NOTE >> The VC++ 10.0 or later library and associated VC++ 10.0 or later sample solutions use the following Stingray Studio specific property sheets:
<stingray_installdir>\Src\SS-Win32-PropSheet.props
<stingray_installdir>\Src\SS-X64-PropSheet.props
You may use the Stingray Studio specific property sheets in your new or newly ported applications that link to Stingray Studio libraries. If you need to modify these files, we strongly recommend copying and renaming them before using them in your application in order to prevent Stingray VC++ 10.0 or later library and sample build errors.
Editing an Existing Property Sheet
View property sheets by going to the Property Manager tab. To edit an existing property sheet, open an appropriate configuration such as Debug, expand the project and the configuration, right click on the property sheet and select Properties. On the Property Pages dialog you can change project settings as needed. Keep in mind that changes made to a property sheet affect all configurations that contain the same property sheet.The property sheets for setting paths have been added to all shipped samples through their *.vcxproj project files. Here is an example of the entries pointing to these files:
 
<Import Project="..\..\..\..\..\Src\SS-X64-PropSheet.props" />
<Import Project="..\..\..\..\..\Src\SS-Win32-PropSheet.props" />
Note that if you wish to move a sample to another location or edit the sample's property sheet, the relative paths above may not be correct for the new location or new property sheet. Each build configuration's property sheet should be removed from the project using the Property Manager, and then re-added with the new location or new property sheet. This way, Visual Studio can adjust the path and filename to use the new file. Alternatively, the sample's *.vcxproj file may be edited manually.
NOTE >> Property sheets are added to each build configuration in any MSVS 2010 (or later) Stingray project. It may be necessary to remove property sheet references for configurations that do not require them or to add new build configurations to a property sheet. After a property sheet is created or modified, the new settings are applied to all configurations that contain that property sheet.
Select the Proper Build Configuration
After loading the Stingray Studio project, be sure the desired library configuration is selected by clicking Build | Set Active Configuration.
You can also optionally add a selection control to one of your toolbars. Click Tools | Customize... on the Commands tab, choose the Build category. You should now see buttons that pertain to the build process. You should also see a selection control on the right side that you can drag to a toolbar. This control will display the current build configuration, and will allow you to change it quickly.
Header Files across Stingray Studio Versions
As of Stingray Studio 11.2.0, all product versions were changed to a single build number, major.minor.maintenance, i.e. 11.2.0.
This caused backward-compatibility issues with the following header files (line numbers are approximate as they are subject to change):
<Stingray Root Dir>\Src\Grid\stdafx.h, line 99
<Stingray Root Dir>\Src\Grid\BkEndMak\gxdll.cpp, line 49
<Stingray Root Dir>\Utils\Grid\Designer\dxwarn.h, line 11
<Stingray Root Dir>\Src\Toolkit\STDAFX.h, line 116
<Stingray Root Dir>\Include\Views\OdAll.h, line 244
Here's a brief history with a list of affected hex version values:
Table 5 – Stingray Header Files and Hex Values by Version
CD Version
Stingray Studio Version
Affected Product(s)
Hex Value
Decimal Value
CD56
11.1.0
OT,OV
0x000011
17
CD56
11.1.0
OG
0x001301
4865
CD57
11.2
OG,OT,OV
0x000460
1120
CD58
11.3
OG,OT,OV
0x001130
4400
The logic varied between these files. As of Stingray Studio 11.3.0, the logic has been changed to use either a previous hex version value or the current hex version value which is then followed by appropriate #pragma messages and a compiler error upon failure.
In an application, you can use either the current hex version value or the previous hex version value through the use of a custom C++ preprocessor macro, _USE_OLD_HEX_VERSION. You will need to rebuild your Stingray Libraries with this macro in order for the logic to work correctly in your linked application.
If your application code checks for older header files and you wish to use the previous hex value, add in this custom preprocessor value to your application settings when linking to Stingray Studio versions 11.2.0 and higher.
This logic change means that you need to alter your current settings just once and in a very limited way with their current header validation logic.
For example,
#ifdef _USE_OLD_HEX_VERSION
#if _GX_VER < [TAG_OG_HEX_VERSION]
#pragma message( "You have tried to compile with Objective Grid header files
which are not from Stingray Studio version 11.3.0" )
pragma message( "Please make sure that you have correctly set up your include directory!" )
#
#error Wrong OG header files.
#endif
#else
#if _GX_VER < [TAG_HEX_VERSION]
#pragma message( "You have tried to compile with Objective Grid header files which are not from Stingray Studio version 11.3.0" )
#pragma message( "Please make sure that you have correctly set up your include directory!" )
#error Wrong OG header files.
#endif
#endif
For each subsequent release, the TAGs above are replaced with current hex version values. For products with a pre-11.2 hex version value that is higher than the current hex version (Objective Grid, Objective Toolkit and Objective Views), the previous hex version will be incremented via its maintenance number until it no longer exceeds the current hex version which could be incremented by its major number.