Ryan Dietrich wrote:
Exceptions were a piece of cake (Thanks!)... Multiple objects isn't
going too well thus far.
1. Since you specifically state that you have to use the "OBJECTS"
parameter, does this mean using MYEXTLIB and targeting a shared library
is out of the question?
OBJECTS lists the object files generated from XS files, MYEXTLIB is
for plain C code, you do not need to use MYEXTLIB in order to have
multiple .xs files.
2. What is My.pm ? This isn't covered anywhere in the perldoc for
ExtUtils::MakeMaker. Do I create My.pm loose in the directory where
h2xs generates the lib directory?
I used My.pm as a placeholder for your Perl module.
3. Where did you find documentation on all this boot_* stuff? I've been
looking around, and don't see it mentioned anywhere!
I do not think there is any documentation on this, I just figured
this out by reading the .c files generated by xsubpp.
4. In my "lib" directory should I have a ".pm" for each C++ class I want
to be able to use? (h2xs only created a ".pm" file for the first
library). (I am pretty sure you're going to say yes, but I want to
understand what the approach is for doing this). Also, I think h2xs is
causing me more headaches than it's worth at this point.
There is no need to have multiple .pm files. In the typical setup
you have a single .dll file containing the generated code, and you need
to load it once using XSLoader/DynaLoader. This will load all the
classes defined in the generated .dll/.so file.
HTH,
Mattia