Wednesday, January 15, 2014

Pre-System 7 software from MPW 3.5

lwip PPP IP address dialog in Macintosh System 6.0.8
lwip PPP IP address in System 6.0.8
I spent way too long the last couple of nights trying to get MPW to build an application that could be run on pre-System 7 (even System 6.0.8). I tried using MPW 3.1 (System 6 only) and MPW 3.5 (System 7.1 - Mac OS 9) in different ways to get it to work. Here were all of my attempts and results:
  1. Compiled with MPW 3.5 in Classic Environment. Result: compiled application crashes on pre-System 7 OS.
  2. Run MPW 3.1 in Classic Environment. Result: MPW 3.1 crashes immediately.
  3. MPW 3.1 on System 6.0.8. Result: Even after numerous modifications to code and Makefile, the C complier generated so many errors on basic code that I stopped trying to figure out the problem.
  4. MPW 3.5 using MPW 3.1 Libraries. Result:
    # Undefined entry, name: "_A5Init3" # Could not find data initialization patch entry "_A5Init3" ILink - Execution terminated!
    _A5Init3 is in MPW 3.5 MacRuntime.o library. Started to think the compiler was inserting calls to System 7 specific stuff...
  5. Inserted empty _A5Init3() function into my code. Result: compiled application crashes on all Systems.
  6. MPW 3.5 using MPW 3.1 Libraries, and MPW 3.5 MacRuntime.o library (for _A5Init3). Result: compiled application crashes on all Systems.
  7. MPW 3.5 using MPW 3.1 C compiler. Result: See #3 above. Starting to hope the Linker was just looking for System 7 specific stuff...
  8. MPW 3.5 using Link instead of ILink linker. Result: compiled application crashes with "Unexpectedly Quit" on 6.0.8, works on System 7.1, exits immediately in Classic Environment.
  9. Compiled with MPW 3.5 using Link and MPW 3.1 Libraries. Result: ### Link: Error: Undefined entry, name: (Error 28) "__p_CType"
  10. Compiled with MPW 3.5 using Link and MPW 3.1 Libraries and Interface files. Result: compiled application seems to run in Classic Environment, System 7.1 and 6.0.8!
That was a huge obstacle that I am very happy to overcome. Using the MPW 3.5 SC compiler and Link linker with the MPW 3.1 Libraries and Interfaces folders did the trick and I would recommend this set-up to anybody trying to compile pre-System 7.1 software in Mac OS X Classic Environment. The only difference seems to be that stdin and stdout are displayed in dialogs while the program runs, rather than being saved to text files. A benefit of that is I can actually take a screen shot! Now to do some testing and try older systems, including the 128K...

1 comment:

  1. this is amazing!! 👏👏👏 congrats on getting this to work! I am trying to get MPW installed on my MacPlus running system 7.1

    ReplyDelete