Stingray Studio : Stingray® Foundation Library User’s Guide : Chapter 2 Getting Started : Building SFL Libraries with the Visual Studio Solution
Building SFL Libraries with the Visual Studio Solution
SFL includes a Visual Studio solution for building each configuration of the library. The solution is located in the Install\SRC directory and is named Foundation<ver>.sln, where <ver> is the Microsoft Visual Studio version. The solution contains a single project with every build configuration for SFL. Complete the following procedure to build one or more configurations of the library.
1. Start Microsoft Visual Studio.
2. Open the project and go to Project | Properties | Configuration Properties | VC++ Directories.
Figure 2 – SFL Include Options
3. Open the Foundation<ver>.sln solution in the Install\SRC directory.
4. From the Build menu in Visual Studio, select Set Active Configuration and then choose the build configuration that suits your needs. By default, Win32 All is selected, which will build every combination of the SFL library. The Unicode configuration builds every library that supports Unicode. All of the other configurations build one specific library. The value afxlib indicates that MFC will be linked statically, and afxdll indicates that MFC will be used as a DLL. If neither afxlib nor afxdll is specified in the build configuration, it is a non-MFC configuration of the library.
Figure 3 – SFL Configuration Manager
5. From the Build menu in Visual Studio, select Build Foundation<compiler-version> to build the selected library. Visual Studio builds the selected libraries and copies them into the <Install>\LIB directory
Figure 4 – SFL Build Menu
Make Files and Building Directly with nmake
When you build the Stingray libraries in Visual Studio, Visual Studio invokes make files that ship with the product. For information on these underlying make files, and how to build the libraries by invoking nmake on these files directly, see “Building from the Command Line with nmake” in the Getting Started part.
This section also discusses the issue of building the libraries with 1-byte structure alignment rather than the default 8-byte structure alignment.
Cleaning SFL Build Targets
The intermediate object files that are produced when you build the SFL libraries can appropriate significant disk space on your computer. After building the libraries, we recommend that you delete these files to reclaim the space on your hard drive.
The location for all generated object files is
<Install>\Src\objs\<compiler_version>\<architecture>\<product_abbrv>+<product_version>+<build_configuration_abbrv>.
For example, C:\Program Files\Perforce\Stingray Studio \Src\objs\vc11\x86\sfl1120asd\*.obj.