creating DLLs with .cpp files


I created a DLL of my PhAB project as explained in the QNX Help and it works when I use it with another PhAB application. But when I change the file extensions of my DLL files to .cpp (originally .c) it stops working (no code has been modified yet!). The DLL still compiles, but crashes when I use dlopen() from my other application.

My goal is to put some c++ objects in my DLL but it doesn’t seem to work.

I haven’t done anything with DLLs so far, so can someone give me a hint what I’m doing wrong?

Thank You


Your code gets suddenly compiled as C++ code. The C++ symbol naming is not the same as in C. This mini-HOWTO helped me a lot with this:±dlopen/index.html

Thanks for the link!! It helped me understand the name mangling issue and now it works…