Linking C++ Programs with dbfork
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:
#ifdef _AIX
#include "/usr/totalview/include/libdbfork.h"
#endif
int main (int argc, char *argv[])
{
}
In this case, you would not use the -bkeepfile option and would instead link your program using one of the following options:
/usr/totalview/include/libdbfork.a -L/usr/totalview/include -ldbfork