• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Error When Compiling a Hello World in MW C/C++

nathanpc

6502
Hello,

I'm trying to make a Hello World project in MetroWerks C/C++ 1.01, see the code:

Code:
// Hello.c
#include 

int main(void)
{
   printf("Hello, World!");
 return 0;
}
And here is the make log:

Code:
·· Link Error   : LinkError:Hello.c: 'printf' referenced from 'main' is undefined.
Thanks,

Nathan Paulino Campos

 
I would suggest you have to include an ANSI C library in the project.

Also make sure you are building some form of console program, what you have is not how traditional Macintosh programs are written.

 
Back
Top