How to creat and link a shared library

hi all,
I am new to QNX. Currently I wrote a c++ program for QNX RTOS6.2.1.The source code include main.cpp, class1.h class1.cpp; class2.h class2.cpp, where class1 and class2 are c++ class used by main.

Now I want to build class1 and class2 into shared library(static or dynamic), which is called by other main program. I just learned how to creat a .so file, but I am not sure whether I did it in correct way. Any one can give me an example how to creat the .so file and link it with main program? (gcc compiler)

Thanks

the shared libs in QNX 6 is no different from other Unixes. You can read those other docs, such as
erlenstar.demon.co.uk/unix/faq_7.html#SEC79

If I use “gcc” for compiler . This shared library is normal. But now I want to use the QNX IDE to debug a shared library . I don’t how use the tool for shared library! Please help!