where is _AESend in OSX ?

  • I'm trying to compile a command line program that sends AppleEvents
    to another program.

    Compiling with:
    cc -o aetest aetest.c -I/Developer/Headers/FlatCarbon  \
        -framework ApplicationServices

    I get:

    /usr/bin/ld: Undefined symbols:
    _AESend

    Where is AESend ?

    I see in
    /System/Library/Frameworks/ApplicationServices/Frameworks/AE/Headers

    that there is a AESendMessage in AEMach.h, which implements
    AppleEvents with Mach Messages, but there must be a Carbon
    compatability def of AESend somewhere.

    [BTW: This is with 10.0.4 -- I'm still waiting for my 10.1 CD to arrive!]

    -- Steve Majewski
  • On Wednesday, October 10, 2001, at 12:52  am, Steven D. Majewski wrote:

    > Where is AESend ?

    HIToolbox.framework in Carbon.framework.

    /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.
    framework/Versions/A/Headers/AEInteraction.h

      -- Finlay
  • Hi Mark,

    AESend is in the Carbon.framework (which is at a higher level than
    ApplicationServices.framework.)  The reason for this is that AESend can
    cause user interaction, which requires all of Carbon be available for
    process manipulation and user interface.

    As an alternative, you can use AESendMessage, which omits the user
    interaction parameters and allows you to write command line tools.  See the
    header <AE/AEMach.h> for the prototype and more information.  If you use
    AESendMessage, you can link against ApplicationServices.  If you need to
    use AESend, you link against Carbon.

    --smz

    On Tuesday, October 9, 2001, at 04:52 PM, Steven D. Majewski wrote:

    > I'm trying to compile a command line program that sends AppleEvents
    > to another program.
    >
    >
    > Compiling with:
    > cc -o aetest aetest.c -I/Developer/Headers/FlatCarbon  \
    > -framework ApplicationServices
    >
    > I get:
    >
    > /usr/bin/ld: Undefined symbols:
    > _AESend
    >
    >
    > Where is AESend ?
    >
    > I see in
    > /System/Library/Frameworks/ApplicationServices/Frameworks/AE/Headers
    >
    > that there is a AESendMessage in AEMach.h, which implements
    > AppleEvents with Mach Messages, but there must be a Carbon
    > compatability def of AESend somewhere.
    >
    >
    > [BTW: This is with 10.0.4 -- I'm still waiting for my 10.1 CD to arrive!]
    >
    > -- Steve Majewski
    > _______________________________________________
    > carbon-development mailing list
    > <carbon-development...>
    > http://www.lists.apple.com/mailman/listinfo/carbon-development
  • Thanks.
    I discovered that adding "-framework Carbon" worked moments before
    Finlay Dobbie's message suggesting that.
    I haven't yet found any problems due to user interaction in my
    command line program, but I haven't pushed it severely. If I find
    any problems, I'll try rewriting it to use AESendMessage.
    I appreciate the explaination of why it wasn't were I expected it
    to be. Thanks!

    -- Steve Majewski

    On Wed, 10 Oct 2001, Steve Zellers wrote:

    > AESend is in the Carbon.framework (which is at a higher level than
    > ApplicationServices.framework.)  The reason for this is that AESend can
    > cause user interaction, which requires all of Carbon be available for
    > process manipulation and user interface.
    >
    > As an alternative, you can use AESendMessage, which omits the user
    > interaction parameters and allows you to write command line tools.  See the
    > header <AE/AEMach.h> for the prototype and more information.  If you use
    > AESendMessage, you can link against ApplicationServices.  If you need to
    > use AESend, you link against Carbon.
    >
    > --smz
    >