[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Modules] Extension not printing to MacPerl window



Hi, Rudi

I can't try it until this evening, but likely your problem has to do with
where printf() is being defined. Using DumpPEF in MPW, or looking at you
link map in the CW IDE, if you checked off that option, will tell you
what library printf() is being grabbed from.

printf() occurs in Perl, also. The default system include path is allowing
you not to declare <stdio.h>, although you ought to put that in, but
depending on the link order of your libraries, it may well be that the
linker is picking up the stub for printf, not the code ref in the C
library. Easy enough to find out. If that's the case, move your libraries
around.

Also, in XS code it doesn't hurt to use the Perl IO abstraction,
documented in the 'perlio' manpage. The counterpart to printf is
PerlIO_stdoutf().

As regards what libraries you need in general, unless you intend to
rebuild MacPerl the libraries that come with Codewarrior are all you'll
ever need to build extensions. This goes for Toolbox also.

Arved



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org