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

[MacPerl] XS Lite Continues



I had a longer blurb, but my ISP's mail server was down, and so it appears
that my original email went to electronic purgatory.

Anyhow, for the benefit of Codewarrior types with no old libraries, here's
another example. We'll tackle one of Matthias' Toolbox modules, Controls.

In MPW, change the working directory to
HD:MacPerl_Src:perl:ext:Mac:Controls, and incant 'perl Makefile.PL', as
per usual.

Recall that we're only modifying libraries, and we're doing it in a
working copy of ExtBuildRules.mk. To build Controls, for PPC we add
InterfaceLib and the (NL) C library for PPC. (NL) in the library name
means that it's been compiled with the MPW -mapcr option, which is the
default under MPW.

So now for PPC we have 4 libraries. Do a BuildProgram all and a
BuildProgram install. IMPORTANT: test (ControlWindow.t for example) under
the MacPerl *app*, not running the perl tool in MPW. Take my word for it.
:-) Since the install has put the stuff in 'blib', you need to either use
the -M option on the shebang line, or put 'use blib' in the test script.

Our new Controls shared library works just fine.

I'm hesitant to recommend a library set for CFM68K, because although I
have one that works, I can't test it.

Next time, or 'Real Soon Now', we'll take something like SQL::Statement
and build that. Chris Nandor has this on CPAN as a binary, but it's of
interest because it's multiple source. After that, we'll take a useful C
library from someplace, and using just basic CW MPW, we'll make an XS
extension for it and build it for MacPerl.

NOTE: I'm putting this up in installments for feedback. Eventually this is
going to be a POD tutorial, though - MacPerl XS with Codewarrior Pro. And
no old libraries...

Arved



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch