This section describes how to use Microsoft Visual C++ compilers to compile programs that use Rogue Wave's LAPACK.h++ class library.
Before starting, be sure that the Microsoft environment variables PATH, INCLUDE, and LIB are set to the proper search path for the Microsoft compiler, the system #include header files, and the libraries, respectively.
Let's say that we have a file named myapp.cpp and that we are compiling it in a Windows NT MS-DOS command prompt. Let's also say that our LAPACK.h++ header files are located in c:\rwav\workspaces\WINNT4\MSVC60\0s, and that we built static, single-threaded, no debug versions of LAPACK.h++, Math.h++ and Tools.h++ named, respectively, lpk0s.lib, mth0s.lib and tls0s.lib. Then we can compile myapp.cpp with the Microsoft C++ compiler with the following command (all on one line):
cl -Ic:\rwav\workspaces\WINNT4\MSVC60\0s myapp.cpp c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\lpk0s.lib c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\laf0s.lib c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\bla0s.lib c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\mth0s.lib user32.lib c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\tls0s.lib
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.
This command will compile and link in one step.
The -I option tells the compiler where to find the Rogue Wave header files.
The c:\rwav\workspaces\WINNT4\MSVC60\0s\lib\tls0s.lib path and the other lib paths are the full path names for no standard library, no debugging, static LAPACK.h++, FORTRAN, BLA, Math.h++, and Tools.h++ libraries for Microsoft C++. (Substitute as appropriate.)
The user32.lib is the library for message-boxes and other widgets.
NOTE: Even if you are compiling a LAPACK.h++ Windows NT or Windows 95 console program, you still need to link in the user32.lib library, because Tools.h++ uses the Windows message box to report errors.
Microsoft Visual C++ allows you to create a LAPACK.h++ DLL under Windows 95 and Windows NT.
To use the 32-bit DLL version of LAPACK.h++, you must:
Use the Microsoft runtime DLL.
Use the DLL version of Tools.h++.
Define the macros RW_LAPACK, _RWLAPACKDLL, _RWMATHDLL, _RWTOOLSDLL, and _RTLDLL on the compiler command line. This tells the header files to configure for dynamic linking. If LAPACK.h++ is also using the Standard C++ Library, you must also define _RWSTDDLL. See the Tools.h++ Getting Started guide for more information on using the Standard C++ Library with Tools.h++.
In addition, you must defined the macros RW_MULTI_THREAD, and _REENTRANT when using a multithreaded version of the library.
Use the -MD or -MDd option on the compiler command line in order to use the release or debug version, respectively, of the Microsoft runtime library DLL.
You must link your program with the Math.h++, Tools.h++ and LAPACK.h++ import libraries. Example names of the import libraries are:
Release Version (no symbolic debugging or assertions):
LAPACK.h++: lpk4d.lib, laf4d.lib, and bla4d.lib
Math.h++: mth4d.lib
Tools.h++: tls4d.lib
Standard C++ Library: std11d.lib. In addition, if you're building with the Standard C++ Library, you must replace 4d in the build types above with 11d.
Microsoft runtime library: msvcrt.lib
Debug Version (with symbolic debugging and assertions):
LAPACK.h++: lpk7d.lib, laf7d.lib, and bla7d.lib
Math.h++: mth7d.lib
Tools.h++: tls7d.lib
Standard C++ Library: std15d.lib. In addition, if you're building with the Standard C++ Library, you must replace 7d in the build types above with 15d.
Microsoft runtime library: msvcrtd.lib
The LAPACK.h++ DLL is lpk<build#>d.dll. See Section 2.4 for information on build numbers. Check the Tools.h++ Build Guide or Standard C++ Library Build Guide for the name of the DLL file.
When you run your program, the LAPACK.h++, Math.h++, Tools.h++, Standard C++ Library, and Microsoft runtime library DLLs must be in one of the following places:
the current directory
the \WINDOWS or \WINNT directory
the \WINDOWS\SYSTEM or \WINNT\SYSTEM32 directory
the directory containing the executable file for the current task
the directories listed in the PATH environment variable
the list of directories mapped in your network search paths
If you get exceptions, especially in *.DLLs, and you can't figure out where they're coming from, you may have incompatible *.DLLs running. Check for incompatible.DLLs in your path.
To build a program that uses LAPACK.h++ under the Microsoft Visual Studio development environment, you must add the Rogue Wave include path, such as <rw_root>\workspaces\WINNT<ver>\MSVC<ver>\<buildtype>, to your studio configuration. Use the menu selection Tools | Options... to bring up the options dialog. Select the Directories tab, select Include Files from the Show Directories For: drop-down box, and add the necessary include paths.
You will also need to define any macros and compiler switches required to use a particular configuration of the LAPACK.h++, Math.h++, and Tools.h++ products.
See the Microsoft Visual Studio help system for instructions on making changes to a project configuration.
©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.