help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile/run a code from emacs


From: Baloff
Subject: Re: compile/run a code from emacs
Date: Wed, 20 Jul 2005 06:14:55 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

N. Raghavendra wrote:
At 2005-07-19T04:46:28-07:00, Baloff wrote:


N. Raghavendra wrote:


In your source files, specify the value of the variable
`compile-command' like this:
/*  * Local Variables:
* mode: c
* compile-command: "make && ./project1"
* End:
*/


do you mean to put the above 4 lines in my c++ code but with out the
/*, *, */? since they are for commenting?


The local variables section should be commented, since it is not part
of your source code.  So, do not remove the comment delimiters.


(global-set-key [f5] 'compile)

ok, it works, I put the commented code in my source file and hit f5, it asked to save main.cpp and it then

opened another buffer window and compiled it, but did not run the program.
my line in the commented section is
*compile-command: "make && ./proj1"
since proj1 is the target I have in my makefile



Raghavendra.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]