new to linux
wanted to know how to compile cpp prog in vi or emacs
editor
pls help
new to linux
wanted to know how to compile cpp prog in vi or emacs
editor
pls help
I dont think you can but you should have a gcc compiler on Linux that will do it for you.
You are to compile it in console.
$ gcc prog.c -o prog
for C
$ g++ prog.c -o prog
for C++
or try manual pages
$man -a gcc
$man -a g++
vim can do that in its command line mode thingy, i dont know how my self but its in vims help file.
yup, i forgot about the bang. now i have to see where output goes... this could come in handy, i normally use vim.Do you mean `:w prog.c' then `:!gcc prog.c' in vim command?
In emacs: M-x compile
You could also setup a key to do it in your .emacs file. For example:
(global-set-key [f9] 'compile)
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
and if you have some errors on your code, M-` to go to the line...
you should also add something like that in your .emacs :
(global-set-key [f4] 'previous-error)
(global-set-key [f5] 'next-error)
oups, C-x M-`