This section describes how to use Unix compilers to compile programs that use Rogue Wave's Tools.h++ Professional class libraries.
To use the Tools.h++ Professional libraries in your own program:
Add the directory containing the Tools.h++ Professional header files to your include list.
Link to the appropriate Tools.h++ Professional and Tools.h++ libraries.
For instance, to build a program called myapp that uses the net library from the Networking module, you might use the following command line (all on one line):
CC -Irwav/workspaces/SOLARIS25/SUNPRO42/4s myapp.cpp rwav/workspaces/SOLARIS25/SUNPRO42/4s/lib/libtls4s.a rwav/workspaces/SOLARIS25/SUNPRO42/4s/lib/libnet4s.a -o myapp
The example assumes the libraries were exported to the rwav/workspaces/SOLARIS25/SUNPRO42/4s directory.
If you linked to a static set of Tools.h++ Professional libraries, you are ready to run the resulting program.
If you linked to a shared set of Tools.h++ Professional libraries, before running the resulting program be sure that the library location is available in the environment variable that your operating system uses to describe the possible locations of shared libraries. For many operating systems, this environment variable is LD_LIBRARY_PATH. Some operating systems use a different name; be sure to use the one appropriate to your operating system.
NOTE: This step is recommended for all shared UNIX Tools.h++ Professional libraries, and required for some platforms.
You may set the library path variable from your shell, or by including it in your rc or profile script.
For example, in a Korn or Bourne or similar shell, if your libraries are installed in the /usr/local/rwav/workspaces/SOLARIS25/SUNPRO42/4s/lib directory, use the following command (all on one line):
export LD_LIBRARY_PATH=/usr/local/rwav/workspaces
/SOLARIS25/SUNPRO42/4s/lib:$LD_LIBRARY_PATH
If you use the Cshell or a similar shell, the command is:
setenv LD_LIBRARY_PATH /usr/local/rwav/workspaces
/SOLARIS25/SUNPRO42/4s/lib:$LD_LIBRARY_PATH
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.