QNX4 interrupt for us with CPP code

I am looking for an example to interface some interrupt logic to a cpp
module. I was able to get a c interrupt program to compile and run.
I looked on the QNX site and it said to compile the c and cpp code
into object files and then link the two. I can create the object files but am
lost as how to correctly link the files.

You cannot call C++ code from C, (well not really but to do it becomes really messy). To call c code from C++ you have to indicate to the C++ compiler about the function being C. This is done by putting

#ifdef __cplusplus
extern “C” {

#ifdef __cplusplus

look at the system header file for an example.

That being said you can build your interrupt handler in C++. Just restrict yourself ;-) For example don’t instantiate object in your ISR since the constructor could call memory allocation routine (new) which is illegal in an ISR.