I'm trying to compile a hello world object using MPW... I've created a file called hello.c on my desktop, contents are as follows:

#include <stdio.h>
int main(void){
  printf("hello world!\n");
  return 0;

I've got MPW shell open and I'm attempting the command

mrc /Desktop/hello.c

I assume it has something to do with how I'm expressing the path...

Error message is:

Command line error: unable to open input file '/Desktop/hello.c'

I'm using a Macintosh IIfx running 7.5.5


3 Answers 3


Classic MacOS uses : as a directory separator. / doesn't have a special meaning and is a legal filename character. Additionally, a leading : is a relative path, not an absolute path.

MacOS            Unix
-----            ----
file.c           file.c
Volume:          /Volume
Volume:file.c    /Volume/file.c
:folder:file.c   folder/file.c

MrC is a PowerPC compiler, you want C or SC which are the 680x0 compilers (Apple's original and Apple's licensed version of Symantec's compiler). Also you'll need to actually link the resulting object file with the right libraries to either generated an MPW tool or an application running under SIOW.

I suggest using the CreateMake functionality in MPW to build a Makefile, rather than try to do this all by hand, especially since there are significant differences between what you might be used to from UNIX shells and Makefiles and the MPW implementations of these concepts.

(Also, in case you weren't aware, MPW is just another application on the classic Mac. It's not doing anything like providing access to an "underlying" command line; there is no such thing, if that's why you chose to use MPW rather than, say, THINK C or CodeWarrior.)

  • MPW isn't providing access to an "underlying" command line; rather, it provides its own. Commented May 7, 2017 at 11:35

I figured it out. I needed to go to the directory pull down menu and select Desktop as my working directory, and then type mrc hello.c

  • 1
    MPW has a built-in command called “Directory” to set/show its current working directory, and there is also a script called “SetDirectory” which calls the “Directory” command and also adds an entry to the Directory menu. This way you can quickly switch back to previously-used directories by selecting from this menu. /me remembers way too much about MPW ... Commented Oct 20, 2017 at 2:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .