Frank Heckenbach wrote:
Relying on the default linker names was never reliable.
OK, but how to solve the following problem, without relying on linker names:
- create a Mac OS X dynamic library (dylib) - for that purpose, use a GPC unit "MyDylib" - pass -init _MyDylibInit to ld so that MyDylibInit is called when the dynamic library is loaded - declare a procedure MyDylibInit with attribute( name = 'MyDylibInit')
So far no problem, but MyDylibInit ...
- first calls GPCRuntimeInitialize (or GPC_Initialize if you like) declared with external name '_p_initialize' (relying on a linker name that may change) - then calls MyDylibUnitInit, the compiler glue that initializes the MyDylib unit. The external name used to be init_Mydylib but has recently changed to _p__M7_Mydylib_init (relying on a linker name again).
Regards,
Adriaan van Os