• 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
Re: Trying blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying blocks


  • Subject: Re: Trying blocks
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 30 Oct 2009 09:40:25 +0100


Le 30 oct. 2009 à 07:33, Greg Parker a écrit :

On Oct 28, 2009, at 5:56 PM, Charlie Dickman wrote:
It compiles fine but the load fails with...

"__NSConcreteGlobalBlock", referenced from:
    ___block_holder_tmp_1.1207 in Controller.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Can anyone explain this and help me with what I'm not doing or not doing right?

Blocks are only available on Mac OS X 10.6. Make sure your project's SDK is set to 10.6 (or alternatively "Current Mac OS" if you're compiling on a 10.6 machine). Blocks are currently unsupported on Mac OS X 10.5 and iPhone OS.



_NSConcreteGlobalBlock comes from CoreFoundation. You could get this error if you weren't liking to CoreFoundation, but presumably you are linking to CoreFoundation by way of Cocoa.framework. (Otherwise you'd have trouble with NSNumber and NSTextField too.)


I hate having to contradict you, but according to nm, all block runtime symbols are in libSystem (although CoreFoundation probably override them at runtime to use its own classes).

nm -m CoreFoundation
(undefined) external __NSConcreteAutoBlock (from libSystem)
(undefined) external __NSConcreteFinalizingBlock (from libSystem)
(undefined) external __NSConcreteGlobalBlock (from libSystem)
(undefined) external __NSConcreteMallocBlock (from libSystem)
(undefined) external __NSConcreteStackBlock (from libSystem)
(undefined) external __NSConcreteWeakBlockVariable (from libSystem)



-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Trying blocks
      • From: Greg Parker <email@hidden>
References: 
 >Trying blocks (From: Charlie Dickman <email@hidden>)
 >Re: Trying blocks (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: xml object memory issue
  • Next by Date: Re: Scripting Bridge running method passing an array
  • Previous by thread: Re: Trying blocks
  • Next by thread: Re: Trying blocks
  • Index(es):
    • Date
    • Thread