• 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
Weak linking failing on Intel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weak linking failing on Intel?


  • Subject: Weak linking failing on Intel?
  • From: Rosyna <email@hidden>
  • Date: Thu, 4 May 2006 18:37:30 -0700

I'm trying to weak link an entire framework for a preference pane. This works fine on a PPC mac and nm correctly shows it is weak linked:

(undefined) weak external _VersionCheck (from UpdaterFramework)

On my ICBM nm shows:

(undefined [lazy bound]) weak external _VersionCheck (from UpdaterFramework)

If I actually print out the address of the function, it correctly prints out 0x0 on the ICBM before crashing.

NSLog(@"Calling VersionCheck Dealie: %p", VersionCheck);
if (VersionCheck!=NULL)
{
NSLog(@"Calling VersionCheck Dealie: %p", VersionCheck);
VersionCheck(getpid(),NULL, NULL);
NSLog(@"Ending VersionCheck Dealie");
}


The first call to NSLog shows 0x0. And then it goes into the if statement for some reason, and then shows the second NSLog as 0x0 and then crashes.

Why is it completely skipping the if check? As I said, this exact same code works fine on a PPC mac. If it matters, the PPC code is being compiled with GCC 3.3.
--



Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Weak linking failing on Intel?
      • From: Alexei Kosut <email@hidden>
  • Prev by Date: say, what happened to prefix files?
  • Next by Date: Re: say, what happened to prefix files?
  • Previous by thread: Re: say, what happened to prefix files?
  • Next by thread: Re: Weak linking failing on Intel?
  • Index(es):
    • Date
    • Thread