next up previous
Next: Using GDB under Emacs Up: Compiling, debugging, and tags Previous: Compiling, debugging, and tags

  
Compilation

M-x compile
prompts for a shell command, and then executes that command in a special buffer, named *compilation*. The current file at the time the M-x compile is issued determines the directory in which the shell command executes. The default command is simply make -k. Assuming you follow the convention of putting an appropriate make input file named makefile or Makefile in each source directory, this command will generally do the right thing. While the compilation proceeds, you are free to edit or use the *shell* buffer.
C-x `
finds the next error message in the buffer *compilation* (if any), finds the source files and line referred to by the error message, and displays the error message in one window and the source file in another. Thus, after a compilation is complete (actually, even while it proceeds), you can step through the error messages produced, going automatically to the offending points in the source file so that they can be corrected. The buffer *compilation* also contains the output from the M-x grep command described in section [*].
M-x kill-compiler
cancels a compilation started by M-x compile, if any.


next up previous
Next: Using GDB under Emacs Up: Compiling, debugging, and tags Previous: Compiling, debugging, and tags
David Wolfe
1998-12-15