Linking against HIServices?

  • I'm trying to use the private API CoreMenuExtraAddMenuExtra(), which
    is compiled into HIServices.  However, adding its umbrella framework,
    ApplicationServices, does not link correctly.  I'm working in Leopard,
    but compiling against 10.4u SDK.

    I have the following lines in my header file:

    int CoreMenuExtraAddMenuExtra( CFURLRef path, int position, int
    whoCares,int whoCares2, int whoCares3, int whoCares4);
    int CoreMenuExtraGetMenuExtra( CFStringRef identifier, void *menuExtra);
    int CoreMenuExtraRemoveMenuExtra( void *menuExtra, int whoCares);

    but I get a symbol not found error when Xcode tries to link the
    executable. I have linked against ApplicationServices.framework,  grep
    shows that the HIServices binary contains the string
    CoreMenuExtraAddMenuExtra, so I know it's there.  Is there something
    else I need to do?

    Thanks,

    Josh
  • On 1/19/08, Twisted Theory Software <developer...> wrote:
    > I'm trying to use the private API CoreMenuExtraAddMenuExtra(), which
    > is compiled into HIServices.  However, adding its umbrella framework,
    > ApplicationServices, does not link correctly.  I'm working in Leopard,
    > but compiling against 10.4u SDK.

    On Tiger:

    $ strings /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Versions/A/HIServices
    |grep Menu |wc -l
          0

    So it doesn't exist?

    --Kyle Sluder
  • On 19 Jan, 2008, at 4:58 PM, Kyle Sluder wrote:

    > On 1/19/08, Twisted Theory Software <developer...>
    >> wrote:
    >> I'm trying to use the private API CoreMenuExtraAddMenuExtra(), which
    >> is compiled into HIServices.  However, adding its umbrella framework,
    >> ApplicationServices, does not link correctly.  I'm working in
    >> Leopard,
    >> but compiling against 10.4u SDK.
    >
    > On Tiger:
    >
    > $ strings /System/Library/Frameworks/ApplicationServices.framework/
    > Frameworks/HIServices.framework/Versions/A/HIServices
    > |grep Menu |wc -l
    > 0
    >
    > So it doesn't exist?

    Try:
    $ grep CoreMenuExtraAddMenuExtra /System/Library/Frameworks/
    ApplicationServices.framework/Frameworks/HIServices.framework/Versions/
    A/HIServices
    Binary file /System/Library/Frameworks/ApplicationServices.framework/
    Frameworks/HIServices.framework/Versions/A/HIServices matches
    $

    Josh
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today