The Basics
The Four Basic Build Requirements
1. SET THE INCLUDE PATH More About Include Path
The include path points to the root of the Rogue Wave buildspace that contains the components you are using. If the buildspace is located at c:\RogueWave\SourcePro\<ver>, the command line specification is ‑Ic:\RogueWave\SourcePro\<ver>.
2. LINK IN ROGUE WAVE LIBRARIES More About Linking to Libraries
The libraries are located in the lib subdirectory of the buildspace. That is, if the Rogue Wave buildspace is c:\RogueWave\SourcePro\<ver>, the libraries are in c:\RogueWave\SourcePro\<ver>\lib. If, for example, you linked the Essential Tools Module and trace built in the 15d configuration, your command line would specify this linking on Windows as: tls15d.lib trace15d.lib /link /LIBPATH c:\RogueWave\SourcePro\<ver>\lib. The UNIX equivalent would be: -ltls15d.lib ‑ltrace15d.lib -Lc:\RogueWave\SourcePro\<ver>\lib.
3. DEFINE THE _RWCONFIG=buildtag MACRO More About _RWCONFIG
This one command line macro defines for you all the SourcePro-specific pre-processor macros required by the build. For example, if you link the Essential Tools Module and trace libraries tls15d.lib and trace15d.lib, the command line macro is ‑D_RWCONFIG=15d.
4. SPECIFY COMPILER FLAGS AND SYSTEM LIBRARIES More About System Requirements
Use the same set of compiler and linker options to build your programs that are used to build SourcePro examples. The best places to find the options are in the log files and the generated makefiles. The log files show the commands executed by the makefile.
Sample Command Lines Essential Tools Module and Threads Module trace package
*Windows, where buildspace=c:\RogueWave\SourcePro\<ver> and configuration=15d:
Compile: cl -D_RWCONFIG=15d -Ic:\RogueWave\SourcePro\<ver>
-nologo -EHsc -MDd -W3 -arch:SSE2 -Zi -Od
-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE -c myapp.cpp
Link: cl /Fe myapp.exe myapp.obj trace15d.lib tls15d.lib user32.lib
/link /LIBPATH c:\RogueWave\SourcePro\<ver>\lib -nologo /debug
*UNIX, where buildspace=/usr/local/RogueWave/<ver>, system=Solaris, and compiler=sunpro5:
Compile: CC -m32 -D_RWCONFIG=15d -I/usr/local/RogueWave/<ver> -g -errtags
-mt -c myapp.cpp
Link: CC -m32 -mt -L/usr/local/RogueWave/<ver>/lib -o myapp myapp.o
-ltrace<ver>15d -ltls<ver>15d -lposix4 -lpthread -lnsl
Throughout this document, <ver> stands for the product or library version number.