Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linking with SharedFramework in my bundle



I've got a CFM app that I want to link with a Mach-O framework (the OpenAL Carbon framework). The framework will be stored in the SharedFrameworks directory of my app bundle.

But, I'm a little unclear as to how to locate the framework so I can get my function pointers.

Could I do this (after getting the main bundle of course):

// Look for a resource in the main bundle by name
bundleURL = CFBundleCopyResourceURL( mainBundle,
CFSTR("OpenAL.framework"),
kBundleAnyType,
kBundleNoSubdir );

and then to load the framework:

*bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);
if (*bundlePtr == nil) {
err = coreFoundationUnknownErr;
}
if ( ! CFBundleLoadExecutable( *bundlePtr ) ) {
err = coreFoundationUnknownErr;
}

Any thoughts appreciated.

Wade
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.