Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I am new to c language and I am trying to compile my first program, following a tutorial.
My file hello.c :
#include <stdio.h>
int main(void)
printf("hello, world\n");
I use "make hello" command to compile it but I get the error:
cc hello.c -o hello
process_begin: CreateProcess(NULL, cc hello.c -o hello, ...) failed.
make (e=2): The system cannot find the file specified.
<builtin>: recipe for target 'hello' failed
make: *** [hello] Error 2
I have MinGW installed and I have it in my environment variables PATH.
I am trying it on Windows 8.
Please any help I would very appreciate.
Maybe there is another way to compile a c files?
–
–
–
MinGW is actually a gcc compiler. So the C compiler is invoked with gcc
instead of cc
. Try running this command:
make hello CC=gcc
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.