VBD Class Library Example Programs


Topics

Overview

Compiling


Overview

All the classes in the VDB Class Library are located in the "classes" subdirectory. Each component is separated into its own directory and has its own console based test program:

base    - source code directory.
console - console based test program. 

 

The test programs serve as an example to demonstrate the concept presented and allow you to test each component of the class library after making modifications or when porting to another compiler. All the test programs in the "console" directory are named "testprog.cpp".


Compiling the Test Programs

Console Base Test Programs:
Four makefiles are provided in the "console" directory to compile the source code on one of four different compilers. All of the VBD classes have a console based test program. If a "console" directory does not exist, it means that this library is part of another library and is tested somewhere else.

"msvc40.mak"  - Makefile for Microsoft visual C/C++ 4.2
"djgpp.mak"   - Makefile for DJGPP gcc 2.7.2.1 
"gnu_gcc.mak" - Makefile for GNU g++ 2.7.2.1 
"hpux10.mak"  - Makefile for HPUX C++ A.10.24
  

wxWindows Base Test Programs:
Two makefiles are provided in the "wxwin" directory to compile the source code with wxWindows version 1.68B on one of two different compilers. NOTE: Only the VBD core classes have a wxWindows test program.

"msvc40.mak"  - Makefile for Microsoft visual C/C++ 4.2
"hpux10.mak"  - Makefile for HPUX C++ A.10.24  

Curses Base Test Programs:
Four makefiles are provided in the "curses" directory to compile the source code on one of four different compilers. NOTE: Only the terminal based classes have a curses test program.

"msvc40.mak"  - Makefile for Microsoft visual C/C++ 4.2
"djgpp.mak"   - Makefile for DJGPP gcc 2.7.2.1 
"gnu_gcc.mak" - Makefile for GNU g++ 2.7.2.1 
"hpux10.mak"  - Makefile for HPUX C++ A.10.24  

Building the Executable:
To compile use the "make -f" option followed by the makefile name. To compile using MSVC use the "nmake -f" option. The resulting executable will be named after the name set by the PROJECT macro in the makefile. By default all the test programs will be named "testprog" under UNIX or "testprog.exe" under Windows 95/DOS.

Removing the Object Files and the Executable:
To remove the object files and the executable use the "make -f" option followed by the makefile name, followed by "clean": make -f hpux10.mak clean

Under MSVC use the "nmake -f" option followed by the makefile name, followed by "clean": nmake -f msvc40.mak clean


End Of Document