Rogue Wave banner
Previous fileTop of DocumentContentsNext file

4.5 Compiling in Windows with Borland

This section describes how to use Borland's C++ compilers to compile programs that use Rogue Wave's Math.h++ class library.

4.5.1 Using a Static Version of Math.h++ (Borland)

These instructions assume that the Borland include files and libraries are in the locations specified by the file bcc32.cfg for 32-bit compiles. If not, you will have to specify -I and -L flags as well, or change your configuration file. (See the Borland User's Guide for instructions.)

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 the Math.h++ and Tools.h++ header file include path is

and that we have built a static, multithreaded version of Math.h++ named mth4s.lib. Then we can compile myapp.cpp with the Borland C++ compiler with the following command (all on one line):

This command will compile and link in one step.

4.5.2 Using a Dynamic Version of Math.h++ (Borland)

Math.h++ can be built as a DLL using Borland C++ under Windows 95 and Windows NT. Be sure to review the readme file for additional tips on using the DLL.

To use the DLL version of Math.h++, you must:

  1. Use the Borland runtime library (RTL) DLL.

  2. Define the macros _RWMATHDLL, _RWTOOLSDLL, and _RTLDLL on the compiler command line. This tells the header files to configure for dynamic linking.

  3. Link your program with the import libraries. Example import libraries names are:

  4. When you run your program, the Math.h++ DLL and the Borland RTL DLL must be in one of the following places:

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 the directories indicated above.

4.5.3 Compiling from the Borland C++ IDE

When using the Borland C++ IDE, you must define the Rogue Wave include path, for example, <rw_root>\workspaces\WINNT4\BORLANDC++_Builder_30\4s, to every project. Use menu selection Options | Project | Directories.

You should also add the appropriate Math.h++ library to your Project Window. See the Borland User's Guide for instructions.


Previous fileTop of DocumentContentsNext file

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