public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* no input files when calling gfortran
@ 2023-01-01  0:45 Hans Lonsdale
  2023-01-01 13:31 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Lonsdale @ 2023-01-01  0:45 UTC (permalink / raw)
  To: Gcc Help

Am trying to compile a free-format fortran file with some subroutines in it, with gfortran complaining
about the file.  What is going on?

gfortran -O3 -ffree-form -o kamkrai-sort.f
gfortran: fatal error: no input files; unwilling to write output files
compilation terminated.


-- 
Sent with https://mailfence.com  
Secure and private email

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

* Re: no input files when calling gfortran
  2023-01-01  0:45 no input files when calling gfortran Hans Lonsdale
@ 2023-01-01 13:31 ` Jonathan Wakely
  2023-01-01 15:14   ` Hans Lonsdale
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2023-01-01 13:31 UTC (permalink / raw)
  To: Hans Lonsdale; +Cc: Gcc Help

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

On Sun, 1 Jan 2023, 11:43 Hans Lonsdale via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Am trying to compile a free-format fortran file with some subroutines in
> it, with gfortran complaining
> about the file.  What is going on?
>
> gfortran -O3 -ffree-form -o kamkrai-sort.f
> gfortran: fatal error: no input files; unwilling to write output files
> compilation terminated.
>



The -o option names the output file, but you have told the compiler to use
your input file as the output file.

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

* Re: no input files when calling gfortran
  2023-01-01 13:31 ` Jonathan Wakely
@ 2023-01-01 15:14   ` Hans Lonsdale
  2023-01-01 15:48     ` Tom Kacvinsky
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Lonsdale @ 2023-01-01 15:14 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Gcc Help

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]



January 1, 2023 at 2:31:28 PM CET Jonathan Wakely <jwakely.gcc@gmail.com> wrote:

On Sun, 1 Jan 2023, 11:43 Hans Lonsdale via Gcc-help, <gcc-help@gcc.gnu.org> wrote:

Am trying to compile a free-format fortran file with some subroutines in it, with gfortran complaining
about the file.  What is going on?

gfortran -O3 -ffree-form -o kamkrai-sort.f
gfortran: fatal error: no input files; unwilling to write output files
compilation terminated.

The -o option names the output file, but you have told the compiler to use your input file as the output file.

What is the appropriate command that generates the object file only ?

 
-- Sent with https://mailfence.com  Secure and private email

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

* Re: no input files when calling gfortran
  2023-01-01 15:14   ` Hans Lonsdale
@ 2023-01-01 15:48     ` Tom Kacvinsky
  2023-01-01 16:05       ` Hans Lonsdale
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Kacvinsky @ 2023-01-01 15:48 UTC (permalink / raw)
  To: Gcc Help

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

On Sun, Jan 1, 2023 at 10:34 AM Hans Lonsdale via Gcc-help <
gcc-help@gcc.gnu.org> wrote:

>
>
> January 1, 2023 at 2:31:28 PM CET Jonathan Wakely <jwakely.gcc@gmail.com>
> wrote:
>
> On Sun, 1 Jan 2023, 11:43 Hans Lonsdale via Gcc-help, <
> gcc-help@gcc.gnu.org> wrote:
>
> Am trying to compile a free-format fortran file with some subroutines in
> it, with gfortran complaining
> about the file.  What is going on?
>
> gfortran -O3 -ffree-form -o kamkrai-sort.f
> gfortran: fatal error: no input files; unwilling to write output files
> compilation terminated.
>
> The -o option names the output file, but you have told the compiler to use
> your input file as the output file.
>
> What is the appropriate command that generates the object file only ?
>

gfortran -O3 -ffree-form -c kamkrai-sort.f

Or if you want to name the object file differently,

gfortran -O3 -ffree-form -c  kamkrai-sort.f -o some_other_name.o

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

* Re: no input files when calling gfortran
  2023-01-01 15:48     ` Tom Kacvinsky
@ 2023-01-01 16:05       ` Hans Lonsdale
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Lonsdale @ 2023-01-01 16:05 UTC (permalink / raw)
  To: Tom Kacvinsky, Gcc Help



> ----------------------------------------
> From: Tom Kacvinsky via Gcc-help <gcc-help@gcc.gnu.org>
> Sent: Sun Jan 01 16:48:06 CET 2023
> To: Gcc Help <gcc-help@gcc.gnu.org>
> Subject: Re: no input files when calling gfortran
> 
> 
> On Sun, Jan 1, 2023 at 10:34 AM Hans Lonsdale via Gcc-help <
> gcc-help@gcc.gnu.org> wrote:
> 
> >
> >
> > January 1, 2023 at 2:31:28 PM CET Jonathan Wakely <jwakely.gcc@gmail.com>
> > wrote:
> >
> > On Sun, 1 Jan 2023, 11:43 Hans Lonsdale via Gcc-help, <
> > gcc-help@gcc.gnu.org> wrote:
> >
> > Am trying to compile a free-format fortran file with some subroutines in
> > it, with gfortran complaining
> > about the file.  What is going on?
> >
> > gfortran -O3 -ffree-form -o kamkrai-sort.f
> > gfortran: fatal error: no input files; unwilling to write output files
> > compilation terminated.
> >
> > The -o option names the output file, but you have told the compiler to use
> > your input file as the output file.
> >
> > What is the appropriate command that generates the object file only ?
> >
> 
> gfortran -O3 -ffree-form -c kamkrai-sort.f

I tried your suggestion but I am getting 

 recursive subroutine quicksort (array)
Error: Unclassifiable statement at (1)

end subroutine quicksort
Error: Expecting END PROGRAM statement at (1)

But this is just a file with some variables and a recursive subroutine.



-- 
Sent with https://mailfence.com  
Secure and private email

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

end of thread, other threads:[~2023-01-02  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-01  0:45 no input files when calling gfortran Hans Lonsdale
2023-01-01 13:31 ` Jonathan Wakely
2023-01-01 15:14   ` Hans Lonsdale
2023-01-01 15:48     ` Tom Kacvinsky
2023-01-01 16:05       ` Hans Lonsdale

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).