NSAddImage() error on 10.2.8
NSAddImage() error on 10.2.8
- Subject: NSAddImage() error on 10.2.8
- From: Mark Stultz <email@hidden>
- Date: Wed, 07 Jun 2006 13:13:04 -0500
Hello,
I'm attempting to locate symbols in a framework with the following code:
-----
NSBundle *libraryBundle = [ NSBundle bundleWithPath: path ];
if ( !libraryBundle )
return false;
path = [ libraryBundle executablePath ];
mach_header *library = ::NSAddImage( [ path UTF8String ],
NSADDIMAGE_OPTION_NONE );
if ( !library )
return false;
NSSymbol sym = ::NSLookupSymbolInImage( library, kSymbolName,
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND );
if ( !sym )
return false;
-----
I receive the following error in 10.2.8:
dyld: /Users/apple/Desktop/Game.app/Contents/MacOS/Game truncated or
malformed library:
/Users/apple/Desktop/Game.app/Contents/Frameworks/test.framework/test (file
too small to be a library)
Everything works great in 10.3+. Any idea what may be going on? I was
thinking it was because test.framework/test is an alias to
test.framework/Versions/A/test, but I do not know why it would fail on
10.2.8.
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden