Recompiling means to make the program one more time — to rework the steps you went through to create the program originally. This process usually happens after you modify or change the source code, such as you do in the preceding section. Because the source code is different, you have to feed it to the compiler again to generate the new, better (and, hopefully, bug-free) program.
To recompile the new GOODBYE.C source code, use your compiler as outlined in Appendix A. For most everyone, that’s
gcc goodbye.c -o goodbye
Press the Enter key and pray that no error messages appear, and then you’re done. The new program has been created.
Run the program! Type the proper command — either goodbye or ./goodbye — at the prompt to see the new, stunning output. Who knew that it would be so darn easy to display such crap on the computer’s screen?
After you reedit your source code file, you have to recompile to re-create the program file. That is how you fix an error or modify the program.
If you’re programming in an IDE (Integrated Development Environment) such as Dev-C++ or Microsoft Visual C++, you may need to use a Rebuild or Rebuild All command to create a new program after modifying your source code.
If you see any errors after recompiling, you must re-reedit your source code and then re-recompile again. (You only “reedit” and recompile”; no sense in getting re-happy.)
See also:The setup for a complete (high level) bar
No comments:
Post a Comment