comp.lang.ada
 help / color / mirror / Atom feed
* Use gnat and emacs(Ada-mode) can not compile file :(
@ 2003-05-03  8:13 wang tianyi
  2003-05-03 19:11 ` Simon Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: wang tianyi @ 2003-05-03  8:13 UTC (permalink / raw)


I use emacs21.3 and Ada-mode.el3.6 with gnat 1.5 compile Ada files
  in winXP.
  but when i use "Ada->compile file" from menu,
  it tell me: "&& gcc -c -gnatq i:/xxx.adb , system can not find need
file, Compilation exited abnormally with code 1 at Sat May 03
15:42:24"

  I just want to compile it for windows NOT want to use 'cross_prefix'
  but every time i use "complile file" from menu, it always add &&
  before command gcc -c , and system not find what is &&,
  so system tell : can not find need file.

  any way can get rid of "&&"?

  and I already use "Ada->Costomize" fixed Ada Prj Default Comp Cmd
  from "${cross_prefix}gcc -c ${comp_opt}" to "gcc -c ${comp_opt}" and
save it.
  but it's useless!!!

  I have already set PATH for gnat , and can use gcc command in any
  where .
  
  how to get it work?
  thanks
  
-- 
Best regards,
 wang                          mailto:wang_tian_yi@sina.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Use gnat and emacs(Ada-mode) can not compile file :(
  2003-05-03  8:13 Use gnat and emacs(Ada-mode) can not compile file :( wang tianyi
@ 2003-05-03 19:11 ` Simon Wright
  2003-05-04 14:00   ` wang tianyi
  2003-05-05 20:11 ` Stephen Leake
  2003-05-06 21:26 ` Georg Bauhaus
  2 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2003-05-03 19:11 UTC (permalink / raw)


wangcity@hotmail.com (wang tianyi) writes:

> I use emacs21.3 and Ada-mode.el3.6 with gnat 1.5 compile Ada files
                                          ^^^^^^^^
I don't recognise this, is this gnat 3.15p?

>   in winXP.
>   but when i use "Ada->compile file" from menu,
>   it tell me: "&& gcc -c -gnatq i:/xxx.adb , system can not find need
> file, Compilation exited abnormally with code 1 at Sat May 03
> 15:42:24"
> 
>   I just want to compile it for windows NOT want to use 'cross_prefix'
>   but every time i use "complile file" from menu, it always add &&
>   before command gcc -c , and system not find what is &&,
>   so system tell : can not find need file.
> 
>   any way can get rid of "&&"?

This isn't ${cross-prefix} (which will be empty, should cause you no
problems).

You're having trouble with your project settings ... I'm using a
supported version, and on Linux, but try this ..

Go to Ada->Project->Edit, click on Ada menu. You should see something
like

...
Compiling a single file (menu Ada->Compile File):     [Help]  (comp_cmd)
[INS][DEL] cd ${build_dir}
[INS][DEL] ${cross_prefix}gcc -c -g -O2 -gnatqQ -I${src_dir} ${full_current}
[INS]

(your Windows version may say for the first line
[INS][DEL] cd /d ${build_dir}
)

and each successive line is executed with a && to join them up:

  cd /d c:\Temp && gcc -c -g -O2 -gnatqQ -I. c:\Source\foo.adb

I suspect your problem is that the Windows shell that Emacs is using
doesn't understand the && properly.

If you go to the ada-mode home page at
http://libre.act-europe.fr/adamode/ you'll find a pointer to a mailing
list, however it doesn't seem to have been used for a while .. worth a
try.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Use gnat and emacs(Ada-mode) can not compile file :(
  2003-05-03 19:11 ` Simon Wright
@ 2003-05-04 14:00   ` wang tianyi
  2003-05-05 17:37     ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: wang tianyi @ 2003-05-04 14:00 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote in message news:<x7vn0i34zgw.fsf@smaug.pushface.org>...
> wangcity@hotmail.com (wang tianyi) writes:
> 
> > I use emacs21.3 and Ada-mode.el3.6 with gnat 1.5 compile Ada files
>                                           ^^^^^^^^
> I don't recognise this, is this gnat 3.15p?

yes, i use gnat 3.15p , in windows xp.

> 
> >   in winXP.
> >   but when i use "Ada->compile file" from menu,
> >   it tell me: "&& gcc -c -gnatq i:/xxx.adb , system can not find need
> > file, Compilation exited abnormally with code 1 at Sat May 03
> > 15:42:24"
> > 
> >   I just want to compile it for windows NOT want to use 'cross_prefix'
> >   but every time i use "complile file" from menu, it always add &&
> >   before command gcc -c , and system not find what is &&,
> >   so system tell : can not find need file.
> > 
> >   any way can get rid of "&&"?
> 
> This isn't ${cross-prefix} (which will be empty, should cause you no
> problems).
> 
> You're having trouble with your project settings ... I'm using a
> supported version, and on Linux, but try this ..
> 
> Go to Ada->Project->Edit, click on Ada menu. You should see something
> like
> 
> ...
> Compiling a single file (menu Ada->Compile File):     [Help]  (comp_cmd)
> [INS][DEL] cd ${build_dir}
> [INS][DEL] ${cross_prefix}gcc -c -g -O2 -gnatqQ -I${src_dir} ${full_current}
> [INS]
> 
> (your Windows version may say for the first line
> [INS][DEL] cd /d ${build_dir}
> )
> 

in "Project and Editor configuration. -->[Ada Menu]"
Compiling a single file (menu Ada->Compile File):     [Help] 
(comp_cmd)
it's always is :"cd ${build_dir} && gcc -c "  



whatever I fixed it to "gcc -c" ,but can not save. :(  --i use the "
[Save]" in the page below&#65292;but still can not save , every time
,it's "cd ${build_dir} && gcc -c "



> and each successive line is executed with a && to join them up:
> 
>   cd /d c:\Temp && gcc -c -g -O2 -gnatqQ -I. c:\Source\foo.adb
> 
> I suspect your problem is that the Windows shell that Emacs is using
> doesn't understand the && properly.
> 
> If you go to the ada-mode home page at
> http://libre.act-europe.fr/adamode/ you'll find a pointer to a mailing
> list, however it doesn't seem to have been used for a while .. worth a
> try.

The maillist is not work now ,i send email to it ,but my email can not
arrive.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Use gnat and emacs(Ada-mode) can not compile file :(
  2003-05-04 14:00   ` wang tianyi
@ 2003-05-05 17:37     ` Simon Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Wright @ 2003-05-05 17:37 UTC (permalink / raw)


wangcity@hotmail.com (wang tianyi) writes:


> in "Project and Editor configuration. -->[Ada Menu]"
> Compiling a single file (menu Ada->Compile File):     [Help] 
> (comp_cmd)
> it's always is :"cd ${build_dir} && gcc -c "  
> 
> 
> 
> whatever I fixed it to "gcc -c" ,but can not save. :(  --i use the "
> [Save]" in the page below&#65292;but still can not save , every time
> ,it's "cd ${build_dir} && gcc -c "

Very odd. Have you tried Ada->Customize, Ada Prj Default Comp Cmd
(near the end)?

On my machine the options look as I showed (the 'cd' and the 'gcc' on
separate lines).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Use gnat and emacs(Ada-mode) can not compile file :(
  2003-05-03  8:13 Use gnat and emacs(Ada-mode) can not compile file :( wang tianyi
  2003-05-03 19:11 ` Simon Wright
@ 2003-05-05 20:11 ` Stephen Leake
  2003-05-06 21:26 ` Georg Bauhaus
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2003-05-05 20:11 UTC (permalink / raw)


wangcity@hotmail.com (wang tianyi) writes:

> I use emacs21.3 and Ada-mode.el3.6 with gnat 1.5 compile Ada files
>   in winXP.

Welcome to the most powerful (but most confusing) integrated
development environment :).

>   but when i use "Ada->compile file" from menu, it tell me: "&& gcc
>   -c -gnatq i:/xxx.adb , system can not find need > file,
>   Compilation exited abnormally with code 1 at Sat May 03 >
>   15:42:24"

I don't use the Ada project settings to compile. As you have
discovered, they are slightly broken, and very confusing.

I recommend using Gnu makefiles. There is a version of make
distributed with GNAT, but the one that comes with Cygwin is slightly
better. So get Cygwin (www.cygwin.com), be sure to get 'make' with it,
and read the make manual.

For a good example of using make with Emacs and GNAT, see my web page
http://www.toadmail.com/~ada_wizard/

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Use gnat and emacs(Ada-mode) can not compile file :(
  2003-05-03  8:13 Use gnat and emacs(Ada-mode) can not compile file :( wang tianyi
  2003-05-03 19:11 ` Simon Wright
  2003-05-05 20:11 ` Stephen Leake
@ 2003-05-06 21:26 ` Georg Bauhaus
  2 siblings, 0 replies; 6+ messages in thread
From: Georg Bauhaus @ 2003-05-06 21:26 UTC (permalink / raw)


wang tianyi <wangcity@hotmail.com> wrote:
: I use emacs21.3 and Ada-mode.el3.6 with gnat 1.5 compile Ada files
:  in winXP.
:  but when i use "Ada->compile file" from menu,

In a pinch, you can edit the command before it is run to suit
your needs. Press C-u, then choose the menu entry.  This will
show you the command to be run. you can modify it before running.
Removging the "cd /some/non-windows/dir &&" part might help.

As Stephen has said, there are some problems in ada-mode and project files
together with more recent versions of Emacs.

HTH, georg



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-05-06 21:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-03  8:13 Use gnat and emacs(Ada-mode) can not compile file :( wang tianyi
2003-05-03 19:11 ` Simon Wright
2003-05-04 14:00   ` wang tianyi
2003-05-05 17:37     ` Simon Wright
2003-05-05 20:11 ` Stephen Leake
2003-05-06 21:26 ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox