Go to the first, previous, next, last section, table of contents.


Using the DB library with other languages

If you prefer to write your applications in C++, you may do so, but note that the DB library is written in C. (Most C++ compilers can be run in ANSI/ISO C compatibility mode in order to compile the DB library itself.) Each C++ source file that uses DB library functions must include `<ecg/db.h>', in order to instruct your compiler to use C conventions for argument passing and to use unmangled names for the DB library functions. In order for this to work, your C++ compiler should predefine `__cplusplus' or `c_plusplus'; if it predefines neither of these symbols, modify `<ecg/db.h>' so that the symbols `db_CPP' and `db_PROTO' are defined at the top of the file. Compile and link your program using whatever standard methods are supported by your compiler for linking C++ programs with C libraries. See your compiler manual for further information.

A set of wrapper functions is also available for those who wish to use the DB library together with applications written in Fortran. These functions provide a thin `wrapper' around the DB library functions, by accepting Fortran-compatible arguments (there are no structures, and all arguments are passed by reference rather than by value). You will still need a C or C++ compiler to compile the DB library and the wrapper functions themselves. The Fortran wrapper functions are not discussed in this guide; for further information, refer to `fortran/readme.doc' in the DB Software Package (included in version 9.4 and later versions).


Go to the first, previous, next, last section, table of contents.



George B. Moody (george@hstbme.mit.edu)