• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSAddImage() error on 10.2.8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Catching global keystrokes from cocoa
  • Next by Date: Re: Catching global keystrokes from cocoa
  • Previous by thread: Re: Catching global keystrokes from cocoa
  • Next by thread: vararg functions in frameworks
  • Index(es):
    • Date
    • Thread