Glenn Howes wrote:
I applied your fix and I got further, at least, before crashing again. Running… Program received signal: "EXC_BAD_ACCESS".
Unable to disassemble _p_Unbind.
(partial stack trace) _p_Unbind _p_AssignFile _p_Assign (my code)
Does this appear to be a problem with initialization or linking?
I can't say without knowing more about the application and circumstances (and also see the crash log from the /Applications/Utilities/Console utility).
You can try to locate the problem yourself in Xcode - to enable debug info for Pascal application code, add "-g" to the gpc (or gp) command line options - to get useful debug info for the GPC runtime library, build the Pascal compiler from sources (see my website, it's not difficult anymore) - in Xcode, uncheck the "load symbols lazily" preference setting.
One further issue, we have a Netscape plugin version of this application. I assume that I should call _p_initialize from the module's init method instead of the non-existent main method,
Probably yes, but I have never written a Netscape plugin myself.
and if so what should I pass in as dummy parameters?
See the template for a "Carbon Dynamic Library" in the GPC Xcode Kit for Mac OS X (but adding 0 for the new Options parameter).
procedure GPC_Initialize (ArgumentCount: CInteger; Arguments, StartEnvironment: PCStrings; Options: CInteger); attribute (name = '_p_initialize');
Regards,
Adriaan van Os