Ken Williams writes:
> No - what goes wrong with 5.6.0?  Does Inline itself install okay?

I was unclear.  Inline installs fine and passes its tests.  Here's the
long version of my tale of misery and woe, which I should have posted
first time out.

I thought I'd write an applescript dispatcher, basically a drop-in
replacement for the system() calls everyone uses.  You pass the
function some AppleScript, it runs it, and returns a value.

Apple helpfully have this code on their web pages:
  http://developer.apple.com/qa/qa2001/qa1026.html

So I made a C version. (attached)  Compile it with
  % cc -o as1 as1.c /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon

Run it thus:
  % cat > test.as
  tell Application "Finder"
    activate
  end tell
  ^d
  % ./as1 test.as

It works supersweet.

So, I thought, let's Inline the sucker.  The result is as2.plx, also
attached.  This fails to compile, from what looks like clashing
namespaces:

System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:2155:
 macro `Move' used with only 2 args
/usr/include/gcc/darwin/2.95.2/g++/../stdbool.h:10: warning: empty declarationIn file 
included from 
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:41,
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:2153:
 parse error before `void'

I tried various trickeries (moving the C code off to a precompiled
library) before realizing that I still don't have my
C-compilation-on-Darwin chops down to the point where I can make that
work.

Advice on how to make it work is welcomed.  I plan to be hacking with
Cocoa and Objective C in the last third of this year, and I'd like to
be able to integrate Perl into any applications I write.

Also, feel free to steal the code and Make It Work and release the
module on CPAN.  The last thing I need is something else to be
responsible for :-)

Thanks,

Nat

Attachment: as1.c
Description: Binary data

Attachment: as2.plx
Description: Binary data

Reply via email to