Additional Topics
Procedure for Building Your Applications
The issues listed below require consideration before building an application that links to SourcePro libraries. The example assumes you are developing on the Windows platform. UNIX users need to appropriately adjust the paths and library name extensions.
1. Decide the exact build configuration to use for your application.
The SourcePro libraries you plan to link to your application should be built in the same build configuration as the application itself. Once a build configuration is decided, check whether you already have SourcePro libraries built in that configuration.
This check can be done by looking at Table 10 in Appendix A. Look on the left side of the table to determine the line that corresponds to your main build options -- static or release, linking, and binding. Then note the build tag for the naming convention you normally use.
2. Look in buildspace\lib to see whether you have the necessary libraries.
If, for example, you will link to the Essential Tools Module, and the trace package of the Threads Module, and your build configuration is 12d, the lib directory will need to contain these libraries:
*tls<ver>12d.dll and tls12d.lib
*trace<ver>12d.dll and trace12d.lib
where <ver> is the two-digit major and minor release versions for the library. The first of each pair is the dynamic library needed at run time, while the second is the import library used at link time.
Note that on UNIX systems only a single shared object is generated by a dynamic build, and is used both in linking and at run time.
3. If necessary, build the needed libraries.
If you lack any of the required libraries, you need to start up RCB and build the libraries in the required configuration. You should build all the libraries you intend to link to through the same buildspec to assure compatibility among the libraries. This is true even if you have built one or more of the libraries previously.
4. Once you are confident that all the required libraries are available, collect the following information:
*Path to the libraries and their exact names
*Path to the buildspace root directory
*Build tag used in naming the libraries
In the library names tls12s.lib and tls13012d.lib, the build tags are 12s and 12d respectively. (For dynamically-linked libraries, the digits following the library mnemonic represent the major and minor version numbers (two, three, or four digits, depending on the number of digits in the version numbers); they are not part of the build tag.)
RCB allows you to specify a user tag, a personal identifier for your libraries. For example, if you are working on a project code named “baja”, you might have added that as the user tag when building the libraries. In that case the library name would be tls12dbaja.lib and the build tag would be 12dbaja.
*The system compiler flags and command line macros used when building the examples.
More About System Requirements describes where to look for this information and what the information looks like.
If you are building a static application with MSVC, you should read Using Rogue Wave Static Libraries with MSVC to learn why DLL compiler flags are required.
You now have all of the SourcePro-related information you need to build your application. The command line should contain these elements:
 
compiler-invocation include-paths _RWCONFIG-declaration system-flags-and-macros
cpp-file-name link-libraries [output-file-name]
*At least one include path should point to the root directory of the Rogue Wave buildspace.
*The _RWCONFIG declaration uses the build type tag for the SourcePro libraries: _RWCONFIG=buildtag. For a build tag of 12d, this would be _RWCONFIG=12d.
*For the link libraries, enter the path to each of the SourcePro libraries your application requires.
*Use the system flags and macros you determined in step 4 above.
Your application may, of course, require additional include paths, system flags and macros, and link libraries. Note that:
*Any additional link libraries should be built in the same configuration as the SourcePro libraries, and preferably with the same system flags and macros.
*If you specify system flags and macros not used in building the SourcePro libraries, there could be conflicts. See Dueling Compiler Flags.
If you build your application through a makefile, it will need to contain the same elements. You might find one of the SourcePro makefiles helpful in constructing your application makefile. For help in finding the SourcePro makefiles, see More About System Requirements.