[comp.sys.mac.programmer] MPW C compile

ins_ammm@jhunix.HCF.JHU.EDU (Mamdouh Maher) (09/05/88)

  I am trying to compile a simple C program with MPW C. This is the program:

#include "DDrive 20:MPW:MPW C:CIncludes:stdIO.h"
main()
{
    printf("Hi\n");
}

  Now, the program compiles, but it does not link. The linker always
fails to understand the printf. Does anyone know how I can solve this
problem?

                                                   Mamdouh Maher

dan@Apple.COM (Dan Allen) (09/06/88)

In article <6923@jhunix.HCF.JHU.EDU> ins_ammm@jhunix.UUCP (Mamdouh Maher) writes:
>  I am trying to compile a simple C program with MPW C. This is the program:
>
>#include "DDrive 20:MPW:MPW C:CIncludes:stdIO.h"
>main()
>{
>    printf("Hi\n");
>}
>
>  Now, the program compiles, but it does not link. The linker always
>fails to understand the printf. Does anyone know how I can solve this
>problem?

It sounds like you are not linking with the standard libraries that are
needed, like StdCLib.o, Math.o, CInterface.o, CRuntime.o, etc.  There
are a mess of them...

Dan Allen
Apple Computer