[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs and GFortran
From: |
Angelo Graziosi |
Subject: |
Re: Emacs and GFortran |
Date: |
Mon, 30 Oct 2006 16:27:48 +0100 (MET) |
I do not know if we are speaking of the same thing.
I refer to the possibility to use Emacs like an IDE with GFortran.
I will try to be more clear with this example.
-------------------------------------
$ cat hello.F
program hello
implicit none
write(*,) 'Hello!'
end
-------------------------------------
In Emacs:
M-x compile
g77 hello.F
----------------- *compilation* ----------------
-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Mon Oct 30 15:59:21
g77 hello.F
hello.F: In program `hello':
hello.F:3: <===
write(*,) 'Hello!'
^
Expression at (^) has incorrect data type or rank for its context
Compilation exited abnormally with code 1 at Mon Oct 30 15:59:28
----------------
Now clicking with mouse-1 (on 'hello.F:3' in '<===') jumps to line 3 so we
can examine where the compilation fails (Image a multifile application
with thousands of line of code).
Now using GFortran
M-x compile
gfortran hello.F
----------------- *compilation* ----------------
-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Mon Oct 30 16:10:09
gfortran hello.F
In file hello.F:3
write(*,) 'Hello!'
1
Error: Syntax error in WRITE statement at (1)
Compilation exited abnormally with code 1 at Mon Oct 30 16:10:12
------------------
But we cannot jump to the wrong line clicking with mouse, we only know
that the error occurs at line 3 which we reach manually.
Obviously this happens even if one uses pure F95 code.
Angelo.
On Mon, 30 Oct 2006, Stefan Monnier wrote:
> > I would ask if there is a way to integrate Emacs with GFortran so that in
> > case of compiler error one can jump to the line wher the error is born.
>
> > This works with G77, GCC and G++ but not with GFortran.
>
> Does that mean that GFortran does not use the standard GNU error format?
> That would be unfortunate (and may be better fixed on GFortran's side).
> Could you show us some sample error/warning messages?
>
>
> Stefan
>
- Emacs and GFortran, Angelo Graziosi, 2006/10/30
- Re: Emacs and GFortran, Stefan Monnier, 2006/10/30
- Re: Emacs and GFortran,
Angelo Graziosi <=
- Re: Emacs and GFortran, Stefan Monnier, 2006/10/30
- Re: Emacs and GFortran, Steve Kargl, 2006/10/30
- Re: Emacs and GFortran, Stefan Monnier, 2006/10/30
- Re: Emacs and GFortran, Angelo Graziosi, 2006/10/30
- Re: Emacs and GFortran, Nick Roberts, 2006/10/30
- Re: Emacs and GFortran, Tobias Burnus, 2006/10/30
- Re: Emacs and GFortran, Angelo Graziosi, 2006/10/31
- Re: Emacs and GFortran, Angelo Graziosi, 2006/10/31
- Re: Emacs and GFortran, Stuart D. Herring, 2006/10/31
- Re: Emacs and GFortran, Angelo Graziosi, 2006/10/31