* Newbie error compiling program
@ 2004-02-07 17:08 youKnowme
2004-02-07 17:10 ` GVK
2004-02-09 19:11 ` Kevin Rodgers
0 siblings, 2 replies; 8+ messages in thread
From: youKnowme @ 2004-02-07 17:08 UTC (permalink / raw)
I am using emacs to compile a simple 'hello world' program in c++ mode.
When I type the command to compile the source file I get this error message:
'cd ~/
make -k
make *** no input targets specified and no makefile found. Stop.
compilation exited abnormally with code 2 at (time / date).'
Can anyone tell me how to fix this problem please.?
Thanks in advance.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-07 17:08 Newbie error compiling program youKnowme
@ 2004-02-07 17:10 ` GVK
2004-02-07 17:46 ` youKnowme
2004-02-09 21:58 ` kgold
2004-02-09 19:11 ` Kevin Rodgers
1 sibling, 2 replies; 8+ messages in thread
From: GVK @ 2004-02-07 17:10 UTC (permalink / raw)
youKnowme wrote:
> I am using emacs to compile a simple 'hello world' program in c++ mode.
>
> When I type the command to compile the source file I get this error message:
>
> 'cd ~/
> make -k
> make *** no input targets specified and no makefile found. Stop.
> compilation exited abnormally with code 2 at (time / date).'
>
> Can anyone tell me how to fix this problem please.?
>
> Thanks in advance.
>
>
>
Instead of `make', give your own command there...like `g++ hello.cc'
GVK
--
Happy Hacking!!!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-07 17:10 ` GVK
@ 2004-02-07 17:46 ` youKnowme
2004-02-08 13:28 ` Kai Grossjohann
2004-02-09 21:58 ` kgold
1 sibling, 1 reply; 8+ messages in thread
From: youKnowme @ 2004-02-07 17:46 UTC (permalink / raw)
"GVK" <vamsee_k@students.iiit.net> wrote in message
news:c036hl$90m$1@news.wplus.net...
> youKnowme wrote:
> > I am using emacs to compile a simple 'hello world' program in c++ mode.
> >
> > When I type the command to compile the source file I get this error
message:
> >
> > 'cd ~/
> > make -k
> > make *** no input targets specified and no makefile found. Stop.
> > compilation exited abnormally with code 2 at (time / date).'
> >
> > Can anyone tell me how to fix this problem please.?
> >
> > Thanks in advance.
> >
> >
> >
> Instead of `make', give your own command there...like `g++ hello.cc'
>
> GVK
>
> --
> Happy Hacking!!!
>
Thank you, this fixed the problem. I have another related question. How do i
get emacs to know that a program that i want to execute is in my current
directory? At the moment, I have to keep typing ./ before the executable
name. How can I set it up to do this automatically?
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-07 17:46 ` youKnowme
@ 2004-02-08 13:28 ` Kai Grossjohann
2004-02-09 21:55 ` kgold
0 siblings, 1 reply; 8+ messages in thread
From: Kai Grossjohann @ 2004-02-08 13:28 UTC (permalink / raw)
"youKnowme" <phoenix@home.net> writes:
> Thank you, this fixed the problem. I have another related question. How do i
> get emacs to know that a program that i want to execute is in my current
> directory? At the moment, I have to keep typing ./ before the executable
> name. How can I set it up to do this automatically?
The environment variable $PATH can contain the entry ".".
But I don't recommend to do this. Imagine you do
cd /tmp
ls -la
and some bad guy has written /tmp/ls which deletes your hard disk.
Kai
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-07 17:08 Newbie error compiling program youKnowme
2004-02-07 17:10 ` GVK
@ 2004-02-09 19:11 ` Kevin Rodgers
1 sibling, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2004-02-09 19:11 UTC (permalink / raw)
youKnowme wrote:
> I am using emacs to compile a simple 'hello world' program in c++ mode.
>
> When I type the command to compile the source file I get this error message:
>
> 'cd ~/
> make -k
> make *** no input targets specified and no makefile found. Stop.
> compilation exited abnormally with code 2 at (time / date).'
>
> Can anyone tell me how to fix this problem please.?
At the "Compile command: make -k " prompt, type the name of the executable
(e.g. hello_world) before RET. The make program should have a default rule
for building it from the C++ source file extension.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-08 13:28 ` Kai Grossjohann
@ 2004-02-09 21:55 ` kgold
2004-02-12 13:56 ` Kai Grossjohann
0 siblings, 1 reply; 8+ messages in thread
From: kgold @ 2004-02-09 21:55 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> "youKnowme" <phoenix@home.net> writes:
>
> > Thank you, this fixed the problem. I have another related question. How do i
> > get emacs to know that a program that i want to execute is in my current
> > directory? At the moment, I have to keep typing ./ before the executable
> > name. How can I set it up to do this automatically?
>
> The environment variable $PATH can contain the entry ".".
>
> But I don't recommend to do this. Imagine you do
>
> cd /tmp
> ls -la
>
> and some bad guy has written /tmp/ls which deletes your hard disk.
How about if you put the . at the end of the search path?
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-07 17:10 ` GVK
2004-02-07 17:46 ` youKnowme
@ 2004-02-09 21:58 ` kgold
1 sibling, 0 replies; 8+ messages in thread
From: kgold @ 2004-02-09 21:58 UTC (permalink / raw)
GVK <vamsee_k@students.iiit.net> writes:
> youKnowme wrote:
> > I am using emacs to compile a simple 'hello world' program in c++ mode.
> >
> > When I type the command to compile the source file I get this error message:
> >
> > 'cd ~/
> > make -k
> > make *** no input targets specified and no makefile found. Stop.
> > compilation exited abnormally with code 2 at (time / date).'
> >
> Instead of `make', give your own command there...like `g++ hello.cc'
This is OK as a quick fix.
Once you get past "newbie", you'll want to learn "make". It's the
best way to automatically build a real program with many classes.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Newbie error compiling program
2004-02-09 21:55 ` kgold
@ 2004-02-12 13:56 ` Kai Grossjohann
0 siblings, 0 replies; 8+ messages in thread
From: Kai Grossjohann @ 2004-02-12 13:56 UTC (permalink / raw)
kgold@watson.ibm.com (kgold) writes:
> How about if you put the . at the end of the search path?
Then some funny bloke will write /tmp/mkae or /tmp/telent.
Kai
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-02-12 13:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 17:08 Newbie error compiling program youKnowme
2004-02-07 17:10 ` GVK
2004-02-07 17:46 ` youKnowme
2004-02-08 13:28 ` Kai Grossjohann
2004-02-09 21:55 ` kgold
2004-02-12 13:56 ` Kai Grossjohann
2004-02-09 21:58 ` kgold
2004-02-09 19:11 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).