LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-19-2014, 05:57 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 437

Rep: Reputation: Disabled
Gfortran executable.


Hi there,

I have a sample Fortran 77 file, very simple. I then say:

$ gfortran fortran_1.f

and nothing happens. I mean it takes about 5 second for the command prompt to reappear again. I interpret it as the fact that the executable is being created but no message appears. Checking the directory where the Fortran file fortran_1.f is located I can see the file: a.out. Is it an exec file? If so, how to run it? When I say

$ a.out I get an error message.

When I print this file with cat a.out I can see that inside I most likely have object code.

Please, help to understand it all.

Thanks, - Alex

Last edited by AlexBB; 04-19-2014 at 06:01 PM.
 
Old 04-19-2014, 07:39 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
what version of gfortran are you using ?
the legacy gfortran 33 or 34 supports f77

also unless you really MUST have an "a.out"
link it
Code:
gfortran -o ProgramsNAME  fortran_1.f

Last edited by John VV; 04-19-2014 at 07:41 PM.
 
1 members found this post helpful.
Old 04-19-2014, 08:02 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 437

Original Poster
Rep: Reputation: Disabled
Thank you. It seems to be working. Now it asks for input files which I neglected to provide. But it is definitely a sign of it working. - Alex
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My output file from gfortran compiler is not executable Zope Programming 1 03-08-2013 08:03 AM
[SOLVED] cuda for gfortran ? aihaike Programming 4 09-26-2010 08:07 PM
gfortran for suse elnaz Linux - Newbie 2 11-07-2009 04:18 PM
help gfortran mperez Programming 2 12-16-2007 12:50 PM


All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration