i’ve read the great question here
Is NSObject class a part of the Objective-C runtime library today (instead of being a Foundation component)?
about how NSObject was moved from runtime into its own class between 10.7 and 10.8.
i was hoping to get assistance on how i can use an NSObject with >=10.8 SDKs and a 10.7 build target.
if i try to use a 10.7 target with the modern SDK, it will complain about NSObject being an undefined symbol:
ld64.lld: error: undefined symbol: OBJC_CLASS_$_NSObject
>>> referenced by /Users/Gagan/Downloads/mozilla-unified/toolkit/mozapps/update/updater/launchchild_osx.mm
>>> launchchild_osx.o:(symbol OBJC_CLASS_$_ElevatedUpdateServer+0x8)
>>> referenced by /Users/Gagan/Downloads/mozilla-unified/toolkit/mozapps/update/updater/progressui_osx.mm
>>> progressui_osx.o:(symbol OBJC_CLASS_$_UpdaterUI+0x8)
ld64.lld: error: undefined symbol: OBJC_METACLASS_$_NSObject
>>> referenced by /Users/Gagan/Downloads/mozilla-unified/toolkit/mozapps/update/updater/launchchild_osx.mm
>>> launchchild_osx.o:(symbol OBJC_METACLASS_$_ElevatedUpdateServer+0x8)
>>> referenced by /Users/Gagan/Downloads/mozilla-unified/toolkit/mozapps/update/updater/launchchild_osx.mm
>>> launchchild_osx.o:(symbol OBJC_METACLASS_$_ElevatedUpdateServer+0x0)
>>> referenced by /Users/Gagan/Downloads/mozilla-unified/toolkit/mozapps/update/updater/progressui_osx.mm
>>> progressui_osx.o:(symbol OBJC_METACLASS_$_UpdaterUI+0x8)
i understand why this is the case (because it was in the runtime), but i really want a 10.7 target and not 10.8 (where this error goes away).
how would i link an objective c files that use NSObject for a 10.7 target to make it go away? i tried -framework Foundation and -framework CoreFoundation to no avail.
there must be some way to handle this.