I am new to programing in C and to using the Unix terminal. I would like to compile a program from the terminal before moving on to anything like Xcode. However I run into a problem when using the command "cc main.c" where main.c is the text file:
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
(I have used other variants as well.)
The error I get is: "ld: can't locate file for: -lcrt1.o"
I just reinstalled Developer Tools. Any ideas on what is wrong?
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
(I have used other variants as well.)
The error I get is: "ld: can't locate file for: -lcrt1.o"
I just reinstalled Developer Tools. Any ideas on what is wrong?