* How to compile this simple program in GNU emacs
@ 2008-01-28 1:58 ravi
2008-01-28 10:54 ` Martin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: ravi @ 2008-01-28 1:58 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I typed in the following code "newone.c" in emacs
#include <stdio.h>
int main()
{
int i;
printf("enter i");
scanf("%d",&i);
printf("\nthe value entered is %d",i);
return 0;
}
Then i did M-x compile
gave the command : gcc -o newone newone.c
Then again M-x compile and ./newone
Now emacs displayed another buffer in "compilation mode" like this
-*- mode: compilation; default-directory: "~/Desktop/new/" -*-
Compilation started at Mon Jan 28 07:19:01
./newone
enter i
I have entered 45.
Now here I when I press <RETURN>, it is saying "No error here". But
how do I send in the value 45, without pressing <RETURN>
enter i45<unable to press enter>
I am also unable to press <SPACE>, <BACKSPACE>
Please help me. I looked in compilation mode manual and emacs manual
but could not figure out.
Should I be pressing in some key sequence ?
Please let me know.
Thanks & Regards,
ravi.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to compile this simple program in GNU emacs
2008-01-28 1:58 How to compile this simple program in GNU emacs ravi
@ 2008-01-28 10:54 ` Martin
2008-01-28 20:23 ` Richard G Riley
2008-01-28 19:36 ` Eli Zaretskii
2008-02-02 20:43 ` Oleksander Gavenko
2 siblings, 1 reply; 5+ messages in thread
From: Martin @ 2008-01-28 10:54 UTC (permalink / raw)
To: help-gnu-emacs
To run your program after compilation, I think it's better to open an
OS shell and run it there. Either "M-x shell" to get a shell in Emacs,
or just access the command line in the usual way of your OS.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to compile this simple program in GNU emacs
2008-01-28 1:58 How to compile this simple program in GNU emacs ravi
2008-01-28 10:54 ` Martin
@ 2008-01-28 19:36 ` Eli Zaretskii
2008-02-02 20:43 ` Oleksander Gavenko
2 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2008-01-28 19:36 UTC (permalink / raw)
To: help-gnu-emacs
> From: ravi <ravikanth.au@gmail.com>
> Date: Sun, 27 Jan 2008 17:58:39 -0800 (PST)
>
> Then again M-x compile and ./newone
Don't. M-x compile is not intended for running interactive programs,
it's intended for compilers, Grep, and other similar tools that
produce output, such as error messages, in well-known format, which is
parsed by Emacs in order to display the portion of the file which
produced the error message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to compile this simple program in GNU emacs
2008-01-28 10:54 ` Martin
@ 2008-01-28 20:23 ` Richard G Riley
0 siblings, 0 replies; 5+ messages in thread
From: Richard G Riley @ 2008-01-28 20:23 UTC (permalink / raw)
To: help-gnu-emacs
Martin <loveslave@frustratedhousewives.zzn.com> writes:
> To run your program after compilation, I think it's better to open an
> OS shell and run it there. Either "M-x shell" to get a shell in Emacs,
> or just access the command line in the usual way of your OS.
Just look up gdb in the manual and use that. The multi-window gdb is
very good inside emacs IMO.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to compile this simple program in GNU emacs
2008-01-28 1:58 How to compile this simple program in GNU emacs ravi
2008-01-28 10:54 ` Martin
2008-01-28 19:36 ` Eli Zaretskii
@ 2008-02-02 20:43 ` Oleksander Gavenko
2 siblings, 0 replies; 5+ messages in thread
From: Oleksander Gavenko @ 2008-02-02 20:43 UTC (permalink / raw)
To: help-gnu-emacs
Try this Makefile
run: newone
<tab> echo -e "45\n" | ./$@
newone: newone.c
<tab> gcc -o $@ $<
put it in directory where your newone.c and type M-x compile.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-02 20:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 1:58 How to compile this simple program in GNU emacs ravi
2008-01-28 10:54 ` Martin
2008-01-28 20:23 ` Richard G Riley
2008-01-28 19:36 ` Eli Zaretskii
2008-02-02 20:43 ` Oleksander Gavenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.