Hello,

Regarding the example of using multiple XS files, as detailed here:
http://search.cpan.org/dist/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod#XS

The explanation goes about calling the boot function of one module (Cool::Bar) 
from another module's XS (Cool::Foo).

When I tried to compile such an example, I got the following error

===
foo.xs: In function ‘void boot_Cool__Foo(PerlInterpreter*, CV*)’:
foo.xs:22: error: ‘boot_Cool__Bar’ was not declared in this scope
make: *** [foo.o] Error 1
===

It could be that I've done something wrong, but at least from my naive 
C-compiler POV, the error is correct: the function "boot_Cool__Bar" is not 
declared in the scope of Foo.xs/Foo.c .

My work-around was to add the following forward-declaration to the file Foo.xs 
(at the beginning of the file, before the MODULE keyword):
====
XS(boot_Cool__Bar);
====

Then everything compiled and worked fine, as per your example.

Hope this helps,
 -gordon

Reply via email to