Some Apple docs say that for some cases of binary backwards compatibility, I need to define external functions as weak_import so that the linker will not complain. It is done like:
extern int SayHello() __attribute__((weak_import));
Normally, this would translate to:
function SayHello: int; external name 'SayHello'; attribute(weak_import);
But the weak_import is not recognized by GPC.
GCC has a "weak" attribute for ELF targets, but it is not the same as the "weak_import" attribute for Mac OS X. As far as my knowledge goes, the "weak_import" attribute is currently in the Apple version of gcc only. Nevertheless, it is in the process of being merged into gcc-3.4., see http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00320.html
Another question is whether gpc will automatically recognize the attribute as soon as it is in the back-end.
Maybe, you can solve the linking problem by "weak-linking" the whole framework of library you are using (see the "ld" man page).
Regards,
Adriaan van Os