LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-13-2007, 08:08 AM   #1
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Rep: Reputation: 15
Unhappy use of f2c


hello
i have a fortran program code. can i convert it into C code using f2c or anything else? if yes, then how?
what should i write in command line. i'm using FEDORA CORE 6, and G77(version 3.4.6) compiler.
please help me out
thanks in advance
 
Old 07-14-2007, 10:52 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Do you have f2c installed? If not...
Code:
# yum install f2c
Once you have it installed, read the man page for it ("man f2c") for a complete list of options and abilities, but here is a generic usage of it:
Code:
$ f2c input_file
F2c will just create a C or C++ file of the same name in the current directory. Once f2c translates the code into C or C++, you won't need to use G77 (actually, g77 is practically useless at this point) - you will be using gcc or g++ to compile the code.

Last edited by indienick; 07-14-2007 at 10:54 AM.
 
Old 07-16-2007, 12:46 AM   #3
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Original Poster
Rep: Reputation: 15
use of f2c

i have tried with
# yum install f2c
the result is given below

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do


then i tried
# man f2c

the result is

No manual entry for f2c

means no f2c is installed.now how can i proceed?
 
Old 07-16-2007, 10:42 AM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Here's a link to a Fedora Core 7 RPM for f2c: http://atrpms.net/dist/f7/f2c/.
 
  


Reply



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
Neither an F77 compiler nor f2c found Peter Shepard Ubuntu 5 08-11-2006 10:13 PM
compiling f2c and CNS crystallographic prgram on a linux machine xtalographer Linux - General 1 12-06-2004 09:58 PM
Need help !! Emergency !!! f2c/gcc , g77 issue xudeyong Linux - Software 1 05-02-2003 08:57 AM
Linking when using gcc/f2c combination? chemspecialist Programming 0 05-17-2001 12:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:01 PM.

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
Open Source Consulting | Domain Registration