* emacs compliation error (ada mode)
@ 2015-06-15 21:00 pincerfae
2015-06-16 7:26 ` Simon Wright
2015-06-16 20:39 ` Stephen Leake
0 siblings, 2 replies; 9+ messages in thread
From: pincerfae @ 2015-06-15 21:00 UTC (permalink / raw)
In trying out a 'hello world' tutorial, I keep getting an error message of this sort:
Compilation started at Mon Jun 15 13:58:27
./hello_world
'.' is not recognized as an internal or external command,
operable program or batch file.
Compilation exited abnormally with code 1 at Mon Jun 15 13:58:27
the hello_world.exe program is there in the project folder. what am I missing?
I'm using emacs 24.2 with ada mode on win7.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-15 21:00 emacs compliation error (ada mode) pincerfae
@ 2015-06-16 7:26 ` Simon Wright
2015-06-16 12:35 ` Dennis Lee Bieber
2015-06-16 20:39 ` Stephen Leake
1 sibling, 1 reply; 9+ messages in thread
From: Simon Wright @ 2015-06-16 7:26 UTC (permalink / raw)
pincerfae@gmail.com writes:
> In trying out a 'hello world' tutorial, I keep getting an error
> message of this sort:
>
> Compilation started at Mon Jun 15 13:58:27
>
> ./hello_world
> '.' is not recognized as an internal or external command,
> operable program or batch file.
>
> Compilation exited abnormally with code 1 at Mon Jun 15 13:58:27
>
>
> the hello_world.exe program is there in the project folder. what am I
> missing?
You're on Windows, and I think you must - by design or not - be running
cmd as your shell.
cmd would interpret "./hello_world" as "run the program '.' and pass it
the switch '/hello_world'". Cmd needs a backslash, ".\hello_world".
> I'm using emacs 24.2 with ada mode on win7.
You don't say which ada-mode you're using. M-x ada-mode-version should
tell you.
Here, with 5.1.8, I think you'd customise Ada Build Run Cmd in the Ada
Build subgroup from ./${main} to .\${main} - in your case it may be in
the top-level Ada customisation group and just called Ada Run Cmd or
something like that.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-16 7:26 ` Simon Wright
@ 2015-06-16 12:35 ` Dennis Lee Bieber
2015-06-17 11:52 ` Jean François Martinez
0 siblings, 1 reply; 9+ messages in thread
From: Dennis Lee Bieber @ 2015-06-16 12:35 UTC (permalink / raw)
On Tue, 16 Jun 2015 08:26:57 +0100, Simon Wright <simon@pushface.org>
declaimed the following:
>
>You're on Windows, and I think you must - by design or not - be running
>cmd as your shell.
>
>cmd would interpret "./hello_world" as "run the program '.' and pass it
>the switch '/hello_world'". Cmd needs a backslash, ".\hello_world".
>
It doesn't even need the .\
Unlike Linux/UNIX shells which don't include the current directory as a
default search for executables, Windows command processor always looks in
the current directory; just a simple "hello_world" will suffice.
>
>Here, with 5.1.8, I think you'd customise Ada Build Run Cmd in the Ada
>Build subgroup from ./${main} to .\${main} - in your case it may be in
>the top-level Ada customisation group and just called Ada Run Cmd or
>something like that.
Ah, but I can't speak for running from within an editor -- I think if
it uses current working directory, again no ./ or .\ is needed.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-15 21:00 emacs compliation error (ada mode) pincerfae
2015-06-16 7:26 ` Simon Wright
@ 2015-06-16 20:39 ` Stephen Leake
2015-06-16 22:35 ` pincerfae
1 sibling, 1 reply; 9+ messages in thread
From: Stephen Leake @ 2015-06-16 20:39 UTC (permalink / raw)
pincerfae@gmail.com writes:
> In trying out a 'hello world' tutorial, I keep getting an error message of this sort:
>
> Compilation started at Mon Jun 15 13:58:27
>
> ./hello_world
> '.' is not recognized as an internal or external command,
> operable program or batch file.
This looks like an error message from the cmd shell. "./" is sh shell
syntax; it assumes "." is not in PATH.
What does M-: shell-file-name show? If it's something that ends in
"cmdproxy.exe", then you are running the cmd shell.
> Compilation exited abnormally with code 1 at Mon Jun 15 13:58:27
>
>
> the hello_world.exe program is there in the project folder. what am I missing?
>
> I'm using emacs 24.2 with ada mode on win7.
What version of ada-mode? (M-x ada-mode-version)
What keystrokes are you using to invoke this?
If it's ada-mode 5.x, C-c M-r, then you can change
the variable ada-build-run-cmd in your .emacs:
(setq ada-build-run-cmd "${main}")
Then restart emacs and try again.
You can also use this variable to specify command line args,
but Makefiles are better in the long run.
You can also override ada-build-run-cmd with run_cmd in an ada-mode
project file; see the Emacs help for this variable (it should be in the
info manual, but it's not).
I always run Emacs on Windows with either Cygwin bash or MSYS2 bash as
the shell.
--
-- Stephe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-16 20:39 ` Stephen Leake
@ 2015-06-16 22:35 ` pincerfae
2015-06-17 7:47 ` Simon Wright
2015-06-17 17:21 ` Stephen Leake
0 siblings, 2 replies; 9+ messages in thread
From: pincerfae @ 2015-06-16 22:35 UTC (permalink / raw)
I'm running ada mode 5.18.
well, since the file is in a location I can locate, maybe I'd be better just running the program directly, though it defeats the purpose of building it in emacs.
I wasn't aware I needed to use keystrokes when there's a menu that can be used.
On Tuesday, June 16, 2015 at 1:39:21 PM UTC-7, Stephen Leake wrote:
> pincerfae@gmail.com writes:
>
> > In trying out a 'hello world' tutorial, I keep getting an error message of this sort:
> >
> > Compilation started at Mon Jun 15 13:58:27
> >
> > ./hello_world
> > '.' is not recognized as an internal or external command,
> > operable program or batch file.
>
> This looks like an error message from the cmd shell. "./" is sh shell
> syntax; it assumes "." is not in PATH.
>
> What does M-: shell-file-name show? If it's something that ends in
> "cmdproxy.exe", then you are running the cmd shell.
>
> > Compilation exited abnormally with code 1 at Mon Jun 15 13:58:27
> >
> >
> > the hello_world.exe program is there in the project folder. what am I missing?
> >
> > I'm using emacs 24.2 with ada mode on win7.
>
> What version of ada-mode? (M-x ada-mode-version)
>
> What keystrokes are you using to invoke this?
>
> If it's ada-mode 5.x, C-c M-r, then you can change
> the variable ada-build-run-cmd in your .emacs:
>
> (setq ada-build-run-cmd "${main}")
>
> Then restart emacs and try again.
>
> You can also use this variable to specify command line args,
> but Makefiles are better in the long run.
>
> You can also override ada-build-run-cmd with run_cmd in an ada-mode
> project file; see the Emacs help for this variable (it should be in the
> info manual, but it's not).
>
> I always run Emacs on Windows with either Cygwin bash or MSYS2 bash as
> the shell.
>
> --
> -- Stephe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-16 22:35 ` pincerfae
@ 2015-06-17 7:47 ` Simon Wright
2015-06-17 11:25 ` Simon Wright
2015-06-17 17:21 ` Stephen Leake
1 sibling, 1 reply; 9+ messages in thread
From: Simon Wright @ 2015-06-17 7:47 UTC (permalink / raw)
pincerfae@gmail.com writes:
> I wasn't aware I needed to use keystrokes when there's a menu that can
> be used.
The menu Ada > Build > Run invokes C-c M-r (doesn't the menu show the
equivalent keystrokes on the right side?)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-17 7:47 ` Simon Wright
@ 2015-06-17 11:25 ` Simon Wright
0 siblings, 0 replies; 9+ messages in thread
From: Simon Wright @ 2015-06-17 11:25 UTC (permalink / raw)
Simon Wright <simon@pushface.org> writes:
> The menu Ada > Build > Run invokes C-c M-r
What I should have said is that both are bound to "the command
ada-build-run, which is an interactive Lisp closure in `ada-build.el'."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-16 12:35 ` Dennis Lee Bieber
@ 2015-06-17 11:52 ` Jean François Martinez
0 siblings, 0 replies; 9+ messages in thread
From: Jean François Martinez @ 2015-06-17 11:52 UTC (permalink / raw)
On Tuesday, June 16, 2015 at 2:34:58 PM UTC+2, Dennis Lee Bieber wrote:
> On Tue, 16 Jun 2015 08:26:57 +0100, Simon Wright
> declaimed the following:
> It doesn't even need the .\
>
> Unlike Linux/UNIX shells which don't include the current directory as a
> default search for executables, Windows command processor always looks in
> the current directory; just a simple "hello_world" will suffice.
>
Only by default and you can easily get DOS-like behaviour by adding "." in your PATH. But you should never do it since this is a serious security risk.
Jean François Martinez
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs compliation error (ada mode)
2015-06-16 22:35 ` pincerfae
2015-06-17 7:47 ` Simon Wright
@ 2015-06-17 17:21 ` Stephen Leake
1 sibling, 0 replies; 9+ messages in thread
From: Stephen Leake @ 2015-06-17 17:21 UTC (permalink / raw)
pincerfae@gmail.com writes:
> I'm running ada mode 5.18.
I think you mean "5.1.8"
> well, since the file is in a location I can locate, maybe I'd be
> better just running the program directly, though it defeats the
> purpose of building it in emacs.
>
> I wasn't aware I needed to use keystrokes when there's a menu that can
> be used.
In emacs, "keystrokes" can also mean "menu"; picking a menu entry sends
a key event to the editor. So, what menu entry are you using?
In addition, there are usually keystroke equivalents to menus; once you
get used to them, the keys are faster.
C-c M-r is bound to ada-build-run, which is also bound to the menu entry
Ada | Build | Run.
>> If it's ada-mode 5.x, C-c M-r, then you can change
>> the variable ada-build-run-cmd in your .emacs:
>>
>> (setq ada-build-run-cmd "${main}")
>>
>> Then restart emacs and try again.
Did you try this?
--
-- Stephe
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-06-17 17:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 21:00 emacs compliation error (ada mode) pincerfae
2015-06-16 7:26 ` Simon Wright
2015-06-16 12:35 ` Dennis Lee Bieber
2015-06-17 11:52 ` Jean François Martinez
2015-06-16 20:39 ` Stephen Leake
2015-06-16 22:35 ` pincerfae
2015-06-17 7:47 ` Simon Wright
2015-06-17 11:25 ` Simon Wright
2015-06-17 17:21 ` Stephen Leake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox