C++ Shared Library, QNX 6.1

I’m building a shared object with C++. I am unable to figure out how the
_init and _fini functions work. I know they’re predefined, but I thought I
could bypass the predefined functions with the commands

qcc -Vgcc_ntox86 -shared -c shared.cpp
qcc -Vgcc_ntox86 -lang_c++ -shared -o libshared.so shared.o

Those didn’t do it, but using ld directly did okay for a similar shared
library with c code. But, I still can’t get the C++ shared library to
execute the _init function when dlopen is called.

Any suggestions?

David Kuechenmeister