Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gfortran: fatal error: no input files compilation terminated.

4,624 views
Skip to first unread message

xmia...@gmail.com

unread,
Jun 11, 2016, 3:10:31 PM6/11/16
to
Hi all, I tried to run the complier in the terminal.
But I got "gfortran: fatal error: no input files
compilation terminated."
May I know what is going on? Thanks.

Richard Maine

unread,
Jun 11, 2016, 3:26:19 PM6/11/16
to
Well, the most obvious error is that you failed to actually say what you
did. Don't just tell us what you were trying to achieve. Tell what you
did - *EXACTLY*. Might as well remember that principle for future
questions as well.

As a random guess, I'd posit that you specified no input files, sort of
like the message says. But without knowing exactly what you did, it's
pretty hard to say. Did you perhaps just type nothing but "gfortran",
expecting it to come up with a GUI or something? That's my best guess,
but it is pure speculation without more data.

--
Richard Maine
email: last name at domain . net
dimnain: summer-triangle

William Clodius

unread,
Jun 11, 2016, 3:45:30 PM6/11/16
to
I strongly suspect you did not read any documentation and thought that
running gfortran in a directory with Fortran code was sufficient to
compile and link that code. It is common in a directory of code to only
want only part of the code set to be compiled and linked together. As a
result to compile with gfortan at a minimum you need to include the
names of the files to be compiled on the command line. An intro to the
use of a compiler that should get you over the first hump is at
<https://en.wikibooks.org/wiki/Fortran/Hello_world>

Utimately you will want to look at the man pages if on Linux

man gfortran

and makefiles.

herrman...@gmail.com

unread,
Jun 16, 2016, 1:43:25 PM6/16/16
to
On Saturday, June 11, 2016 at 12:26:19 PM UTC-7, Richard Maine wrote:
> <xmiao...@gmail.com> wrote:
>
> > Hi all, I tried to run the complier in the terminal.
> > But I got "gfortran: fatal error: no input files
> > compilation terminated."

(snip)

> As a random guess, I'd posit that you specified no input files, sort of
> like the message says. But without knowing exactly what you did, it's
> pretty hard to say.

That seems most likely.

Another possibility is that you typed something like:

gfortran abc

instead of

gfortran abc.f90

and your system ignored the name of a file that didn't exist.

The message is normal if you just say:

gfortran

moham...@gmail.com

unread,
Oct 8, 2017, 4:09:59 PM10/8/17
to
I actually did that. O just wrote gfortran and expected like a UI but it gave me that error. I'm new to this and Im installing it for college. how am I to specify files to it?
thanks

kargl

unread,
Oct 8, 2017, 4:50:06 PM10/8/17
to
moham...@gmail.com wrote:

> On Saturday, June 11, 2016 at 11:56:19 PM UTC+4:30, Richard Maine wrote:
>> <xmia...@gmail.com> wrote:
>>
>> > Hi all, I tried to run the complier in the terminal.
>> > But I got "gfortran: fatal error: no input files
>> > compilation terminated."
>> > May I know what is going on? Thanks.
>>
>> Well, the most obvious error is that you failed to actually say what you
>> did. Don't just tell us what you were trying to achieve. Tell what you
>> did - *EXACTLY*. Might as well remember that principle for future
>> questions as well.
>>
>> As a random guess, I'd posit that you specified no input files, sort of
>> like the message says. But without knowing exactly what you did, it's
>> pretty hard to say. Did you perhaps just type nothing but "gfortran",
>> expecting it to come up with a GUI or something? That's my best guess,
>> but it is pure speculation without more data.
>
> I actually did that. O just wrote gfortran and expected like a UI but it gave me that error.
> I'm new to this and Im installing it for college. how am I to specify files to it?
>

gfortran is a command line tool. It does not come with a GUI, but a few
vendors have repackaged gfortran with an IDE. If you are using MS
Windows for an operating system, then may want to look at SimplyFortran
[1]. If you're using linux, I believe gfortran has been integrated into
some GUI system, but do not know for sure.

Suppose you have a file named hello.f90, which contains

print *, 'Hello'
end

% gfortran hellof90

with produce a file name a.out. Note, % is a prompt for tcsh on my
system. a.out is the executable program.

% ./a.out
Hello

You can find additional instructions at [2].

[1] http://simplyfortran.com/
[2] https://gcc.gnu.org/wiki/GFortranGettingStarted

--
steve


robin....@gmail.com

unread,
Oct 9, 2017, 4:18:59 AM10/9/17
to
On Monday, October 9, 2017 at 7:09:59 AM UTC+11, moham...@gmail.com wrote:
> On Saturday, June 11, 2016 at 11:56:19 PM UTC+4:30, Richard Maine wrote:
> > <xmia...@gmail.com> wrote:
> >
> > > Hi all, I tried to run the complier in the terminal.
> > > But I got "gfortran: fatal error: no input files
> > > compilation terminated."
> > > May I know what is going on? Thanks.
> >
> > Well, the most obvious error is that you failed to actually say what you
> > did. Don't just tell us what you were trying to achieve. Tell what you
> > did - *EXACTLY*. Might as well remember that principle for future
> > questions as well.
> >
> > As a random guess, I'd posit that you specified no input files, sort of
> > like the message says. But without knowing exactly what you did, it's
> > pretty hard to say. Did you perhaps just type nothing but "gfortran",
> > expecting it to come up with a GUI or something? That's my best guess,
> > but it is pure speculation without more data.
>
> I actually did that. O just wrote gfortran and expected like a UI but it gave me that error. I'm new to this and Im installing it for college. how am I to specify files to it?

No, you didn't do what Richard told you to do.

He told you: "Tell what you did - *EXACTLY*. "

Now go and do what he told you to do and then come back here.

htari...@gmail.com

unread,
Jul 16, 2018, 2:45:23 PM7/16/18
to
9 Ekim 2017 Pazartesi 11:18:59 UTC+3 tarihinde robin....@gmail.com yazdı:
This dialogue just gave me cancer. He just wanted some help you dont have to be a smartmouth about it and try to at least help. Go satisfy your egos somewhere else.

robin....@gmail.com

unread,
Jul 16, 2018, 11:40:57 PM7/16/18
to
On Tuesday, July 17, 2018 at 4:45:23 AM UTC+10, htari...@gmail.com wrote:
> 9 Ekim 2017 Pazartesi 11:18:59 UTC+3 tarihinde r.....@gmail.com yazdı:
Go away and abuse someone else. Do you abuse people for kicks?

htari...@gmail.com

unread,
Jul 17, 2018, 8:17:43 AM7/17/18
to
17 Temmuz 2018 Salı 06:40:57 UTC+3 tarihinde robin....@gmail.com yazdı:
You are the ones abusing....

Now go and do what I told you to do and then DO NOT come back here.

Arjen Markus

unread,
Jul 17, 2018, 9:41:21 AM7/17/18
to

> >
> > Go away and abuse someone else. Do you abuse people for kicks?
>
> You are the ones abusing....
>
> Now go and do what I told you to do and then DO NOT come back here.

Can we please keep this newsgroup civilised?

Regards,

Arjen

robin....@gmail.com

unread,
Jul 17, 2018, 11:35:45 AM7/17/18
to
On Tuesday, July 17, 2018 at 10:17:43 PM UTC+10, h.......@gmail.com wrote:
> 17 Temmuz 2018 Salı 06:40:57 UTC+3 tarihinde r.....@gmail.com yazdı:
> > On Tuesday, July 17, 2018 at 4:45:23 AM UTC+10, h.......@gmail.com wrote:
> > > 9 Ekim 2017 Pazartesi 11:18:59 UTC+3 tarihinde r.....@gmail.com yazdı:
> > > > On Monday, October 9, 2017 at 7:09:59 AM UTC+11, moham...@gmail.com wrote:
> > > > > On Saturday, June 11, 2016 at 11:56:19 PM UTC+4:30, Richard Maine wrote:
> > > > > > <x......@gmail.com> wrote:
> > > > > >
> > > > > > > Hi all, I tried to run the complier in the terminal.
> > > > > > > But I got "gfortran: fatal error: no input files
> > > > > > > compilation terminated."
> > > > > > > May I know what is going on? Thanks.
> > > > > >
> > > > > > Well, the most obvious error is that you failed to actually say what you
> > > > > > did. Don't just tell us what you were trying to achieve. Tell what you
> > > > > > did - *EXACTLY*. Might as well remember that principle for future
> > > > > > questions as well.
> > > > > >
> > > > > > As a random guess, I'd posit that you specified no input files, sort of
> > > > > > like the message says. But without knowing exactly what you did, it's
> > > > > > pretty hard to say. Did you perhaps just type nothing but "gfortran",
> > > > > > expecting it to come up with a GUI or something? That's my best guess,
> > > > > > but it is pure speculation without more data.
> > > > >
> > > > > I actually did that. O just wrote gfortran and expected like a UI but it gave me that error. I'm new to this and Im installing it for college. how am I to specify files to it?
> > > >
> > > > No, you didn't do what Richard told you to do.
> > > >
> > > > He told you: "Tell what you did - *EXACTLY*. "
> > > >
> > > > Now go and do what he told you to do and then come back here.
> > >
> > > This dialogue just gave me cancer. He just wanted some help you dont have to be a smartmouth about it and try to at least help. Go satisfy your egos somewhere else.
> >
> > Go away and abuse someone else. Do you abuse people for kicks?
>
> You are the ones abusing....
>
> Now go and do what I told you to do and then DO NOT come back here.

You have been offensive since you came to this thread. Just go away.
0 new messages