-
C
Wow. Thats a broad title. Anyways. I need help compiling and executing my c files through command prompt. What I did.
vi new.c
**inserted tons of code***
:wq
gcc -c new.c
**new.o appears**
Now what do I do? I don't know how to link it into an executable. Someone told me something about make, and I don't know what to do. Can someone just tell me the other command to link it into an exec. file?
-
Code:
$ gcc -o new new.c
$ ./new
the first line produces the executable, the second executes it, -c tells gcc not to link the object file, so you won't get an executable in that case.
-
however, "gcc -c" is what you would use if you have a multiple file project, then you would link them afterward.