last day (19 days later) » 

09:48
5
A: Building a "hello, world!" program using MPW

GreenonlineYou might find the following useful. From post#5 on hello world in C on OS 6.0.8 in MPW 3.1, where someone was having the same issue as you (although this issue was on System 6 rather than System 7): link -d -c 'MPS ' -t MPST ∂ hello.c.o ∂ "{CLibraries}"StdClib.o ∂ "{Libraries}"Stubs.o ∂ "{Libra...

By the way, the first code snippet didn't work; Runtime.o is not a thing? But the Create Build Commands step worked like a charm!
Interesting, I have reproduced your errors, and yes Runtime.o seems to be missing. The linked thread in my answer also states that the MPW collection from macintosh garden is also missing Runtime.o, so maybe both macintoshrepository.org and Mac garden have a bad version MPW that has been uploaded.
In the makefile generated by Create Build, these are the libraries specified. LibFiles-68K = ∂ "{Libraries}MathLib.o" ∂ "{CLibraries}StdCLib.o" ∂ "{Libraries}SIOW.o" ∂ "{Libraries}MacRuntime.o" ∂ "{Libraries}IntEnv.o" ∂ "{Libraries}ToolLibs.o" ∂ "{Libraries}Interface.o"
Maybe there is a version difference?
@gorgo - yes, I have started using version 3.2.3 (which was the latest version when the 1990 version of the book was written, from where all of the commands actually come) and it makes much more sense. See the bottom of my linked blog. I haven't got around to updating my answer yet, because I haven't managed to get a compile working (yet), but I determined to do so... Ah, it is good that you have provided the commands generated by the Create Build - I was wondering what they were. :-)
here is the full makefile, if you'd like.
09:48
Excellent! Thanks! :-) I'll make a copy and add it to my blog notes, if that's ok.
That's fine :)
@gorgo Excellent, already done. I am a bit busy doing some gardening now, but when it gets dark I will continue with the MPW3.2.3 stuff. As you may have already seen, I can't find a compile command (yet). But I was very tired last night and needed to stop. I actually have a hard copy of the 1990 book. Had it for twenty years, but never got around to reading it. So, I have been flicking throught that as well.
Ok, I've got to go now, but I'll probably comment more later tonight. Thanks again. :-)
10:32
@gorgo - Yes, chat is fine. We shouldn't have been conversing in the comments anyway, and someone would have probably deleted the comments after a while.
It is strange that neither SC nor C (as described in the book) cause a compile to occur (in MPW3.2.3). However, I'm not particularly familiar with MPW. We used to use Code Warrior at work, and I used ThinkC (later renamed Symnatec C++) at home. So, your question has finally prompted me to get to grips with MPW.
 
2 hours later…
12:07
Ok, fixed the compiler issue. It was an installer issue. Need to rename C 3.2 to C, in the Tools folder.
12:31
@gorgo - I can confirm that link -d -c 'MPS ' -t MPST hello.c.o "{CLibraries}"StdClib.o "{Libraries}"Stubs.o "{Libraries}"Runtime.o "{Libraries}"Interface.o -o helloapp works perfectly in MPW3.2.3 and I can even get the app to work and output "hello world" - from within MPW! :-)
12:43
@gorgo - I have updated my answer
13:17
Fantastic!
Btw, did you think that CodeWarrior/THINK C was any more userfriendly than MPW?

  last day (19 days later) »