[ESS] To Compile and run program written in GNU GCC with Emacs

Michael Hannon jm_hannon at yahoo.com
Wed May 12 02:18:11 CEST 2010


> I am currently using GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) [installed
> from http://vgoulet.act.ulaval.ca ( http://vgoulet.act.ulaval.ca/ )] on
> Windows XP.

> I need your assistance to compile and run C code using Emacs.

You might start by editing a C-language file, then typing:

    C-h m

(Control-h, followed by the letter 'm') to see what commands are defined
expressly for the C mode in Emacs.

A lot of the so-called "electric" commands will just do the right thing
(matching braces as required, etc.).  The output of "C-h m" includes:

    C-x c        compile

which is undoubtedly a command you'll use a lot.  In conjunction with that,
it's convenient to have a file:

    Makefile

in your source directory, as Emacs will attempt to use that by default to
build your program.  (Do a web search for "gnu make", for instance, if you
need help with the Makefile.)

You may wish to consult also:

    http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Good luck,

-- Mike



More information about the ESS-help mailing list