Fixed bug 2489 - SDL2.framework references __Block_copy in /usr/lib/libSystem.B.dylib, but this symbol cannot be found on OSX-10.5
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 22:23:32 -0700
changeset 87151c4a634f364e
parent 8714 4e57cfd9fca8
child 8717 67b9285b0000
Fixed bug 2489 - SDL2.framework references __Block_copy in /usr/lib/libSystem.B.dylib, but this symbol cannot be found on OSX-10.5

Thomas Schatz

The dynamic library (extracted from SDL2-2.0.3.dmg and put in /Library/Frameworks/) references the __Block_copy symbol in /usr/lib/libSystem.B.dylib, which cannot be found:

dlopen(/Library/Frameworks/SDL2.framework/SDL2, 6): Symbol not found: __Block_copy
Referenced from: /Library/Frameworks/SDL2.framework/SDL2
Expected in: /usr/lib/libSystem.B.dylib

From what I could gather __Block_copy seems to be related to the blocks extension to the C programming language introduced by Apple since OSX-10.6 (see: http://thirdcog.eu/pwcblocks/). If this is indeed the case, I don't think the SDL2-2.0.3.dmg on the website is at all compatible with OSX-10.5 countrary to what is announced.
Xcode/SDL/SDL.xcodeproj/project.pbxproj
     1.1 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Sun Apr 06 00:30:48 2014 +0300
     1.2 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Thu Apr 17 22:23:32 2014 -0700
     1.3 @@ -2773,6 +2773,7 @@
     1.4  		00CFA622106A567900758660 /* Release */ = {
     1.5  			isa = XCBuildConfiguration;
     1.6  			buildSettings = {
     1.7 +				CLANG_LINK_OBJC_RUNTIME = NO;
     1.8  				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
     1.9  				DYLIB_CURRENT_VERSION = 3.1.0;
    1.10  				FRAMEWORK_VERSION = A;
    1.11 @@ -2827,6 +2828,7 @@
    1.12  		00CFA628106A568900758660 /* Debug */ = {
    1.13  			isa = XCBuildConfiguration;
    1.14  			buildSettings = {
    1.15 +				CLANG_LINK_OBJC_RUNTIME = NO;
    1.16  				DYLIB_COMPATIBILITY_VERSION = 1.0.0;
    1.17  				DYLIB_CURRENT_VERSION = 3.1.0;
    1.18  				FRAMEWORK_VERSION = A;