Rogue Wave banner
Previous fileTop of DocumentContentsNext file

4.7 Compiling in Unix

This section describes how to use Unix compilers to compile programs that use Rogue Wave's LAPACK.h++ class library.

To use the LAPACK.h++ library in your own program:

  1. Add the directory containing the LAPACK.h++ header files to your include list.

  2. Link to the appropriate LAPACK.h++, BLA, FORTRAN, Math.h++, and Tools.h++ libraries.

For instance, to build a program called myapp you might use the following command line (all on one line). The example assumes the library was exported to the rwav/workspaces/SOLARIS251/SUNPRO420/0s directory.

The entire command line must be typed without carriage returns. Your operating system might have a line length limit. If your command line gets too long, use a response file.

4.7.1 Using a Static Version of LAPACK.h++ (Unix)

If you linked to a static LAPACK.h++ library, you are ready to run the resulting program.

4.7.1.1 Static Version of LAPACK.h++ for AIX CSet++

Follow these instructions when using a static version of LAPACK.h++ for AIX CSet++.


NOTE: It is only necessary to follow this procedure when using the static library. You do not need to follow this procedure if you are using the shared version of the library.

In the directory in which you are compiling your applications, you must create a new directory named tempinc, then copy the contents of the <rw_root>/<workspace>/rw/lapack/tempinc directory into the new tempinc directory. You can call the new tempinc directory by another name as long as you use the compiler option -qtempinc=<your directory name>.

The CSet++ compiler for AIX creates a directory named tempinc by default, in the directory where you are compiling. It stores information about the templates that need to be instantiated at link time in that directory. The LAPACK.h++ library uses some templates internally. However, when building a static library, the linker is never invoked and the result is that the templates are not instantiated. Copying the .C files from the <rw_root>/parts/lpk<ver>u/source/src/tempinc directory into your application's tempinc directory, tells the linker which templates the LAPACK.h++ library needs instantiated. Failure to do this will result in undefined symbols at link time.

4.7.2 Using a Shared Version of LAPACK.h++ (Unix)

If you linked to a shared LAPACK.h++ library, before running the resulting program, be sure that the library location is available in the environmental variable that your operating system uses to describe the possible locations of shared libraries. For many operating systems, this environmental variable is LD_LIBRARY_PATH. Some operating systems use a different name; be sure to use the one appropriate to your operating system.


NOTE: The preceding step is recommended for all shared Unix LAPACK.h++ 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 shell, if your library is installed in the /rwav/workspaces/SOLARIS25/SUNPRO42/4s/lib directory, use the following command (all on one line):

If you are running in other than a Bourne or Korn shell, the command is:

For more information on compiling using shared libraries, review the LAPACK.h++ readme files located in <rw_root>/parts/lpk<ver>u/docs.



Previous fileTop of DocumentContentsNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.