I am really confused on step to, I have downloaded VI Editor. Is the first part
ID: 3848177 • Letter: I
Question
I am really confused on step to, I have downloaded VI Editor. Is the first part in command prompt or is that actually in VI editor. What am i doing wrong on this portion?
2) Create a hello world" program and compile it: cd mkdir helloworld cd helloWorld vi hello World.c using the insert mode, type in the following: hello world #include main int argo, char argv[]) char message Hello World! printf ("ssIn" message) return 0; Using command mode (esc) save and exit VI Cwq and compile, outputting to helloWorld gcc -o helloWorld helloWorld.c execute helloWorld /helloWorld 3) Create a Makefile for helloWorld. UsingVI, create a Makefile: vi Makefile using the insert mode, type in the following: CC gcc CFLAGS Wall #The executable 'helloWorld depends on the helloWorld object file helloWorld: hello World.o $(CC) $(CFLAGS) -o helloworld helloWorld.o #Build helloWorld. o (requires helloWorld.o) hello World. o hello World.c (cc) $(CFLAGS) -c helloworld.c #Clean: remove all the object files clean rm hello World. *.o Using command mode (esc), save and exit VI (:wq) and clean your directory of the previous build executable and object files by invoking the clean section of your Makefile: make cleanExplanation / Answer
The first few statements including vi helloworld.c are to be executed in cmd one by one.
Once vi editor starts after executing vi helloworld.c you will press the i key to enter the insert mode and then type in your program code
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.