I have a Cocoa-based universal dynamic library that also includes more static libraries, from which I want to export functionality. It seems I cannot do the latest without using an export symbols file, and this is fine by me ... somehow. I don't use anywhere the setting "Symbols Hidden by default" (GCC_SYMBOLS_PRIVATE_EXTERN, -fvisibility=hidden). The problem appeared when I was trying to export a base class from the dynamic library, more specifically when trying to use its members in derived classes not included in the library and even more specifically in the 64-bit build: " Undefined symbols: "_OBJC_IVAR_$_PluginBase.fConn" " I am aware of the 64-bit changes: http://developer.apple.com/library/mac/#releasenotes/Cocoa/RN-ObjectiveC/_index.html, section "64-bit Class and Instance Variable Access Control"
And, of course, everything works if I add _OBJC_IVAR_$_PluginBase.fConn to the export file ... but only for the 64-bit build, the 32-bit one doesn't know about such things: " Undefined symbols: "_OBJC_IVAR_$_PluginBase.fConn", referenced from: -exported_symbol[s_list] command line option "
The only solution seems another workaround: to have two export files. But ... I cannot use "Add build setting condition" for EXPORTED_SYMBOLS_FILE setting :-S.
Any ideas (besides using public accessor methods) ?