Add either the -ldbfork or
-ldbfork_64 argument to the command that you use to link your programs. If you are compiling 32-bit code, use the following arguments:
When you use gcc or
g++, use the
-Wl,-bkeepfile option instead of using the
-bkeepfile option, which will pass the same option to the binder. For example:
You cannot use the -bkeepfile binder option with the IBM xlC C++ compiler. The compiler passes all binder options to an additional pass called
munch, which will not handle the
-bkeepfile option.
To work around this problem, we have provided the C++ header file libdbfork.h. You must include this file somewhere in your C++ program. This forces the components of the
dbfork library to be kept in your executable. The file
libdbfork.h is included only with the RS/6000 version of TotalView. This means that if you are creating a program that will run on more than one platform, you should place the
include within an
#ifdef statement’s range. For example:
In this case, you would not use the -bkeepfile option and would instead link your program using one of the following options: