diff --git a/bindings/objc/MacOSobjcrtl.pas b/bindings/objc/MacOSobjcrtl.pas new file mode 100644 index 000000000..df5f46e83 --- /dev/null +++ b/bindings/objc/MacOSobjcrtl.pas @@ -0,0 +1,29 @@ +unit MacOSobjcrtl; + +{$mode objfpc}{$H+} + +interface + +uses + MacOSAll, objcrtl, objcrtl10, objcrtl20; + +implementation + +procedure InitObjCRunTime; +var + MacVersion : SInt32; +begin + if (Gestalt(gestaltSystemVersionMinor, MacVersion) = noErr) then begin + if MacVersion >= 5 + then InitializeObjcRtl20(DefaultObjCLibName) + else InitializeObjcRtl10(DefaultObjCLibName); + end else + InitializeObjcRtl20(DefaultObjCLibName); +end; + + +initialization + InitObjCRuntime; + +end. +