Hello, I have a C++ library which implements about two dozen classes -- data structures and methods which manipulate them. I would like to write a perl module for the library with XS. I have seen a lot of examples of how to interface to C++ with XS and I've successfully built and tested an interface for one of the classes from the library. However I can not find a good (simple) example how to interface to one library which implements multiple independent classes (i.e. DS::A, DS::B, and DS::C).
I was able to setup the build files so that I could put each class in a seperate XS file and have it build "correctly" however the module required a copy of the .o for each class. I think what I would like to setup is a base class (i.e. DS) that will link to the C++ library and export every "DS" class whenever any class in the module is referenced. I would like to keep each class in a seperate XS file for manageability -- unless there is a better method. If someone could show me a basic example of how to do something like this, I would really appreciate it.