Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Crash in Leopard due to symbol not found __NSConcreteStackBlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in Leopard due to symbol not found __NSConcreteStackBlock




Le 28 oct. 2009 à 16:26, Bill Cheeseman a écrit :


On Oct 28, 2009, at 9:24 AM, Jean-Daniel Dupas wrote:

AFAIK, you can't use block in a 10.5 binary as the compiler will generate strong references to symbols not present in the 10.5 runtime (libSystem for instance).

If you want to have two code paths, you have to move the code that uses block in a bundle and load it at runtime.

That's such serious bad news that it seems like it ought to be documented very prominently. Do you know of any documentation? I'll watch the WWDC video, where I assume they would say something about this.



I'm not aware of any doc about it, but that's what clang says at least:

clang -mmacosx-version-min=10.5 -o block block.c
block.c:5:2: error: blocks support disabled - compile with -fblocks or pick a deployment target that supports them
^{
^


and even with -fblocks, nm show that the block runtime symbols are not defined as weak.

nm -m block
0000000100001080 (__DATA,__data) external _NXArgc
0000000100001088 (__DATA,__data) external _NXArgv
(undefined) external __NSConcreteGlobalBlock (from libSystem)
...


The same apply with GCC of course.

That said, you may have a look at the plblocks project which is a backport of the block runtime in 10.5 (and iPhone)

http://code.google.com/p/plblocks/


-- Jean-Daniel




_______________________________________________ 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
References: 
 >Crash in Leopard due to symbol not found __NSConcreteStackBlock (From: Bill Cheeseman <email@hidden>)
 >Re: Crash in Leopard due to symbol not found __NSConcreteStackBlock (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Crash in Leopard due to symbol not found __NSConcreteStackBlock (From: Bill Cheeseman <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.