Home▸ Forums▸ Error When Compiling a Hello World in MW C/C++▸ Error When Compiling a Hello World in MW C/C++ Thread Error When Compiling a Hello World in MW C/C++ Error When Compiling a Hello World in MW C/C++ Hardware 2 posts Sep 26, 2009 — Sep 26, 2009 View original thread ↗ #1 Sat, 26 Sep 2009 - 17:24 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 #2 Sat, 26 Sep 2009 - 20:48 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.
#1 Sat, 26 Sep 2009 - 17:24 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
#2 Sat, 26 Sep 2009 - 20:48 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.