LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-14-2012, 11:56 PM   #1
Blink0
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Question run gcc gfortran


Hi I'm Linux new user, I install slackware 13.37, recently I install gcc-gfortran-4.5.2-i486-2.txz but i have no idea how to run the program, I know is not like windows because I don't see any icon to run the program.
Can help me whit this problem please how to run from konsole or any other form.
 
Old 04-15-2012, 12:26 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
I think your biting off way more than you can handle here.

Short answer

gfortran

Long answer requires more space than this forum allows (just to give you an idea of what your in for)
 
Old 04-15-2012, 12:28 AM   #3
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,381

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
have a look at
Code:
man gfortran
you can find the most comprehensive documentation on its site.
 
1 members found this post helpful.
Old 04-15-2012, 12:58 AM   #4
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 513

Rep: Reputation: 137Reputation: 137
FORTRAN

That brings back memories.

See ponce's link, and also the main wiki: http://gcc.gnu.org/wiki/GFortran and perhaps here: http://en.wikibooks.org/wiki/Fortran/Fortran_examples

I was torn for examples (FORTRAN 77 and WATFIV were the last dialects I used), so, rather, here is a more modern example using Fortran 90:

Code:
beowulf@gandalf:...development $ cat hello.f90
Program Hello
   Print *, "Hello World!"
End Program Hello

beowulf@gandalf:...development $ gfortran -o hello hello.f90

beowulf@gandalf:...development $ ls -l
total 16
-rwxr-xr-x 1 beowulf users 9072 Apr 14 22:46 hello
-rw-r--r-- 1 beowulf users   59 Apr 14 22:43 hello.f90
beowulf@gandalf:...development $ ./hello
 Hello World!
Trivia quiz: FORTRAN is an acronym for what phrase?
 
1 members found this post helpful.
Old 04-15-2012, 01:15 AM   #5
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,593

Rep: Reputation: 142Reputation: 142
A problem that can't be solved with FORTRAN isn't worth to be solved, at all:
Real Programmers Don't Use Pascal

Quiz: FORTRAN stands for FORmula TRANslation, which indicates that the language was created for natural scientists and Mathematicians, while COBOL was "for business".

BTW, are recent incarnations of Fortran supported by GCC, including the "object-oriented stuff"? A quick web search didn't give me a clear answer... Does anyone happen to know?

Regarding the original post: To my knowledge some integrated development environments (IDE) support running the Fortran compiler from GUI. I am not sure that I remember it correctly, but I think it was possible from Netbeans, and may now be possible from Eclipse (yes, originally both were developed as Java IDEs, but support other languages, as well), but I haven't used any of them for many years, so you'll have to check this out yourself.

gargamel
 
1 members found this post helpful.
Old 04-15-2012, 01:43 AM   #6
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 513

Rep: Reputation: 137Reputation: 137
I haven't done it, but you should be able to set up the KDE development environment to do fortran (well maybe not 4.x...). Any decent IDE should be able to handle gcc-fortran. http://en.wikipedia.org/wiki/Compari...t_environments

Don't know about "object-oriented stuff" - such newfangled nonsense is for you youngsters. My quick web search resulted in:

http://fortranwiki.org/fortran/show/...ed+programming
http://www.cs.rpi.edu/~szymansk/oof90.html

IIRC, object-oriented programming is a technique not a language. You can roll your own via C or just use C++ to make you life easier. Making the compiler aware of these tricks aids in efficiency and speed.
 
Old 04-15-2012, 02:27 AM   #7
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,593

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by kingbeowulf View Post
[...]

Don't know about "object-oriented stuff" - such newfangled nonsense is for you youngsters. [...]
Yeah.


Quote:
Originally Posted by kingbeowulf View Post
IIRC, object-oriented programming is a technique not a language. You can roll your own via C or just use C++ to make you life easier. Making the compiler aware of these tricks aids in efficiency and speed.
Well, at least encapsulation should be supported by the language. This is a minimum requirement for oo programming, I think. If you can hide local variables, you can mimic other oo stuff, such as inheritance, if you need it and know how to deal with it. E. g., it takes no less than three years of professional experience, before a newbie is able to know how to use multiple inheritance and operator overloading in C++. And it would take me five years, probably. That explains the popularity of languages like Java, I guess...

Why this excurse? Because FORTRAN 77 did not support any concept of oo programming. Newer version claim, they did, but I don't know, if anyone really uses/needs it.

gargamel
 
Old 04-15-2012, 03:08 AM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 12,608

Rep: Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678Reputation: 1678
Fortran ... you will need more space than is able to post here in a reasonable time


the changes over the years dose make running old and just older lab code "fun"

one friend is an old hand with 77 and posts NEW software in 77
one other uses 90 ( at cern) , the 77 drives him batty .
me i end up in the middle of the two going at it back and forth


gcc changed names " gfortran"

on Mingw and CygWin it is still g77 and g90
some OLD red hat 4 systems might still be using g90 but most modern OS's are using " gfortran"



Google it and do some research
 
Old 04-15-2012, 12:16 PM   #9
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by kingbeowulf View Post
FORTRAN

I was torn for examples (FORTRAN 77 and WATFIV were the last dialects I used), so, rather, here is a more modern example using Fortran 90:
Ah fond memories. I go back a bit further to WATFOR and Ten Statement FORTRAN
 
Old 04-19-2012, 08:56 PM   #10
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 513

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by NyteOwl View Post
Ah fond memories. I go back a bit further to WATFOR and Ten Statement FORTRAN
LOL, ya old geezer. I couldn't get rid of those punch cards fast enough....
 
  


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
problem in installing gcc-gfortran 4.3.3 Kilam orez Linux - Newbie 12 06-29-2011 01:20 AM
[SOLVED] gfortran v4.4.1 run in linux machine gives runtime error ladhikari Programming 2 09-11-2010 12:19 PM
Not able to run gcc smartgupta Programming 2 10-06-2008 08:00 AM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM
gcc does not run nor g++ thematrimix Debian 3 10-02-2005 10:06 PM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration