On Nov 12, 2005, at 17:26, Marvin Humphrey wrote:

Try it with the .xs file in the root directory of the distro -- the same directory as Makefile.PL.

What are MODULE and PACKAGE set to?

For the above config, set...

    MODULE = Foo::Bar::Baz::XSModule    PACKAGE = Foo::Bar::Baz

Foo::Bar::Baz::XSModule should contain the XSLoader::load command. Foo::Bar::Baz should "use Foo::Bar::Baz::XSModule;", but should *not* contain an XSLoader::load command, or you'll get redefinition warnings.

Thank you! I didn't manage to get it right yet, though:

% make
cp lib/Foo/Bar/Baz.pm blib/lib/Foo/Bar/Baz.pm
cp lib/Foo/Bar/Baz/XSModule.pm blib/lib/Foo/Bar/Baz/XSModule.pm
Running Mkbootstrap for Foo::Bar::Baz ()
chmod 644 Baz.bs
rm -f blib/arch/auto/Foo/Bar/Baz/Baz.bundle
env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib Baz.o -o blib/arch/auto/Foo/Bar/Baz/ Baz.bundle \
        \

powerpc-apple-darwin8-gcc-4.0.1: Baz.o: No such file or directory
powerpc-apple-darwin8-gcc-4.0.1: no input files
make: *** [blib/arch/auto/Foo/Bar/Baz/Baz.bundle] Error 1

Playing around with MODULE and PACKAGE wasn't fruitful. I uploaded a tarball with the test in case you'd like to see the actual files:

    http://www.hashref.com/tmp/Foo-Bar-Baz.tar.gz

-- fxn

Reply via email to