Re: Configuring EMACS to Work with C++
*-"DMDP" <dmdp@miracle.net>
|
| I would like to be able to compile code within EMACS. It is my
| understanding that this can be done with C, Fortran, or LISP.
|
| If not, what utilities should I use in conjunction with g++ to make
| debugging easier than using COUT statement for each variable.
If you want to stay inside emacs you should learn (at least) two
commands. The first is 'M-x compile'. This will prompt you for
a command to compile (default is 'make -k' - can be changed) the
program. The output from the compiler will be directed to another
buffer. You can use 'C-x `' to jump to the next error. To debug your
C++ program in emacs you can use 'M-x gdb' to start the GNU debugger.
For debugging, it might be easier to work with xxgdb or ddd. Both
these are Debian packages.
Remember to compile with -g.
--
.elOle.
Reply to: