Lucion

Q: gFortran integrated into Xcode 4.3.3

I have xcode 4.3.3 fully installed.

I have latest gcc fully installed.

I have tested gFortran at the command line.

I have OSX Lion and related software up to date.

 

Xcode does not ship with any Fortran support but it seems to have the capacity to do so. I lack the knowledge.

 

I teach computer programming as a private tutor.

I am new to Xcode but not to Macs.

 

I wish to introduce my students to a full blown IDE whilst also programming in Fortran.

 

Please ONLY reply if you have successfully integrated gFortran into Xcode.

 

(There is a wellknown troll on these forums who loves to post that Fortran is ancient and pretend to be helpful to people wanting help in this matter. Do not post here thanks, I will not enter into any debate and you have no experience in this matter)

iMac, Mac OS X (10.7.4), Most recent iMacs, fully loaded out

Posted on Jul 14, 2012 3:30 AM

Close

Q: gFortran integrated into Xcode 4.3.3

  • All replies
  • Helpful answers

  • by Lucion,Helpful

    Lucion Lucion Jul 15, 2012 2:15 AM in response to Lucion
    Level 1 (35 points)
    Jul 15, 2012 2:15 AM in response to Lucion

    Right now editing a trivial Hello World type program inside Xcode.

     

    Deleted the default starting source file in "C".

    Added a file with source code selected as Fortran 90.

     

    It builds and runs okay.

     

    I suspect that I am using an old Fortran compiler that might already ship with Apple's use of an old GCC build behind the scenes?

     

    I have the latest gFortran available and working at the command line.

     

    Would like to know how to force this to be used. I have the option to add a Custom Script as a Build Rule for my source Target but don't know how to make one of these Custom Scripts as the included documentation is silent on that.

     

    -----

     

    It would appear that the colourising of the source code to highlight keywords and so forth is based upon whatever is selected in the little area to the bottom right of the main Xcode screen. No Fortran option in there.

  • by pymoo,

    pymoo pymoo Jul 20, 2015 6:33 AM in response to Lucion
    Level 1 (0 points)
    Jul 20, 2015 6:33 AM in response to Lucion

    Dear Lucion,

     

    Do you still use Xcode and gfortran for recent versions of Xcode (6.4 for example)? I have gfortran installed and working fine in command line, but I can't build and run a simple program in Fortran in Xcode. How did you proceed?

  • by Cla4MyMac,

    Cla4MyMac Cla4MyMac Sep 30, 2016 11:03 AM in response to pymoo
    Level 1 (8 points)
    Sep 30, 2016 11:03 AM in response to pymoo

    I am using Xcode 8.0.

    And I have the same problem: Gfortran is working from command line, but I can't build and run a simple program in Fortran in Xcode.

    In my case "gfortran" does not even appear in the source file options.

    Is there any new information? Any help?

    I have been looking everything in this forum and I have no found anything yet.

    Thanks a lot!