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 08-26-2004, 04:58 PM   #16
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30

Im still a very confused. In order to use Fortran77 what will I have to do in order to use it? Please list all the commands if possible.

I installed the package by popping in the CD2 of Mandrake 9.1. When it finished installing, it was successful.

I just need to find the Fortran program and open it. But how do I compile it in order for it to work?

Do I need to download extra stuff in order for this to work? If so, what do I need to download and where to put that downloaded file to???


Last edited by unixfreak; 08-26-2004 at 05:03 PM.
 
Old 08-26-2004, 05:09 PM   #17
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Again a very plain case of read the man-page
man g77



Cheers,
Tink
 
Old 08-26-2004, 05:13 PM   #18
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
>>> It says 'No input Files' <<<

I think you do have g77, but have no
program to run g77. Create a simple
fortran code, hello.f:

<6 spaces> PROGRAM HELLO
<6 spaces> WRITE(*,*) 'Hello World'
<6 spaces> STOP
<6 spaces> END

Then compile/execute it

g77 -o hello hello.f
./hello

What is your output says? Should says

Hello World

For docs, do a

man g77

Sheng-Chieh


p.s. My g77 is 88844 bytes. I.e,

rscheng@docs:~/xdisk/linux/rscdocs$ ls -l /usr/bin/g77
lrwxrwxrwx 1 root root 7 2004-08-18 19:56 /usr/bin/g77 -> g77-3.3

rscheng@docs:~/xdisk/linux/rscdocs$ ls -l /usr/bin/g77-3.3
-rwxr-xr-x 1 root root 88844 2003-10-05 14:52 /usr/bin/g77-3.3
 
Old 08-26-2004, 05:16 PM   #19
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
I did the man g77

I opened the GNU Fortran 77 Compiler.

Now where and what should I do from here?

And the bottom it has like Objects, Synopsis etc

Last edited by unixfreak; 08-26-2004 at 05:20 PM.
 
Old 08-26-2004, 05:36 PM   #20
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Ok, step by step.

The g77 command requires you give it a filename on the command line. As michaelk mentioned, a valid command would be something like:
g77 some_file.f

You need to provide that file. You have to create it yourself. Open a text editor, type in the FORTRAN source code you want, and save it.

Then, at a command line, issue the command above, but change "some_file.f" to whatever filename you saved with the text editor previously.

When the command completes, it will either inform you of errors in your file that you need to correct, or it will produce an executable file.

If you do not see any errors, you run the program by executing:
./a.out

The g77 command does not open a text editor for you. It's not a development environment. Its only purpose is to convert the code you give it into an executable file. If you're looking for a development environment (like Visual C++, Borland Turbo Pascal, or other types you find in Windows), then you need to find another program. Chances are good that other program is simply a shell that will use the g77 command. So don't remove g77 if you go look for a development environment.
 
Old 08-26-2004, 05:44 PM   #21
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by unixfreak
I did the man g77

I opened the GNU Fortran 77 Compiler.

Now where and what should I do from here?

And the bottom it has like Objects, Synopsis etc
Tried reading the lot?

Man is Linux' help-file system. If you read it you may
understand how things work. man g77 doesn't bring up
an ide for g77.




Cheers,
Tink
 
Old 09-03-2004, 02:21 PM   #22
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by unixfreak
Ok, so i need to use Fortran77. So I cant use Fortran? Or what do I need to do to get this going?

How could I use it then?
You said that you're getting an error similar to "no input files". Do you have a Fortran source to compile. If yes, then pass the necessary parameters to g77. Read the g77 man page for proper command syntax. If you don't have any Fortran source handy, open your favorite text editor and start writing. I'm sure that if you did a Google search you could find a quick "hello world" program to use as a test compile.
 
  


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
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 09:59 AM
How to output a C stream into a binary file readable via Fortran I/O? zero79 Programming 8 02-07-2005 09:51 PM
Find File broken, need search utility, where does WineX install, KDE file roller? Ohmn Mandriva 6 07-05-2004 11:34 PM
Fortran unformatted file conversion from Solaris to linux SenorPedo Programming 2 03-01-2004 12:13 AM
how can I see a fortran file in linux tal Linux - Newbie 2 10-02-2003 12:48 PM


All times are GMT -5. The time now is 07:10 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