Help with XCode and Fortran

Joined
Nov 20, 2008
Messages
3
Reaction score
0
Points
1
I need some help with my PhD thesis. I need to develop a program in Fortran and I am not too sure how to do this on my mac.

I have a copy of Microsoft Developer Studio, but when I try to run it on Parallels, I am getting a fatal error message. My co-worker told me that he saw this as well whenever he did not have MS Dev installed on the C drive. Since I have a “virtual C drive” I am wondering if I can even run MS Dev on parallels.

I have heard that it is easier to program on the Mac side of things, but I have not done this before. From what I understand there is a program called Xcode (although it is not on my machine right now, I think it came on the CD) that I could use.

Has any one every used X code for programming Fortran?

I am assuming that I need to install X code and a Fortran compiler. Does anyone know where I could get the compiler?

Can someone give me the basics on how I could start programming
Fortran on the Mac.

Thank you in advance.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
I have a copy of Microsoft Developer Studio, but when I try to run it on Parallels, I am getting a fatal error message. My co-worker told me that he saw this as well whenever he did not have MS Dev installed on the C drive. Since I have a “virtual C drive” I am wondering if I can even run MS Dev on parallels.

Plenty of people run the whole MS Dev Studio in VMs, so that in it self isn't your problem. You co-worker has indicated you are missing something. Search that message in some MDS forum or Google.

I have heard that it is easier to program on the Mac side of things, but I have not done this before. From what I understand there is a program called Xcode (although it is not on my machine right now, I think it came on the CD) that I could use.

When they talk 'easier', they tend to compare it to other popular languages, such as C++.

Yes, your install disc does have XCode, but I don't recall it having Fortran. If you want the latest XCode you can download it from Apple for free by signing up for a free developer id.

Has any one every used X code for programming Fortran?

I am assuming that I need to install X code and a Fortran compiler. Does anyone know where I could get the compiler?

Can someone give me the basics on how I could start programming
Fortran on the Mac.

I don't know, but let me Google that for you. Several people have discussed Fortran. Load XCode so you know what version you have. That may be relevant.
 
Joined
May 14, 2008
Messages
8
Reaction score
0
Points
1
Location
Arizona
Your Mac's Specs
Dual 2 GHz PowerPC G5, OS X V. 10.4.11 and iMac 2.66 GHz Intel Core 2 Duo OS X 10.5.2
I have used my mac for programming in FORTRAN for several years now. However, I code in F77 (!) and use the GNU gcc/g77 compiler suite. You can google gcc and follow their instructions for downloading it for free to your mac. I believe there was a binary version available for my mac, but I run a powerpc with Tiger. You will have to see if their is a build for your mac and you will want gcc/gfortran since g77 is not supported anymore.

The easiest way to access open source for the mac and keep it up to date is using Fink (google, it is free). A helper program for fink is called FinkCommander (google, also free). Install Fink first, then the helper program. This gives you a gui interface for accessing many open source code out there for the mac. I believe this is how I got my gcc/g77 suite.

Alternatively, you can buy a compiler for the mac such as the Portland Group compilers,

PGI | Products

This product is pretty expensive but I understand they work very well and are used for some pretty heavy duty compiling (e.g. climate models) so will likely be around awhile. The software works for C, C++, FORTRAN and possibly others.


hope this was helpful. Yolande
 
Joined
May 14, 2008
Messages
8
Reaction score
0
Points
1
Location
Arizona
Your Mac's Specs
Dual 2 GHz PowerPC G5, OS X V. 10.4.11 and iMac 2.66 GHz Intel Core 2 Duo OS X 10.5.2
FYI, I checked the gfortran website and there is a build for an intel mac running Tiger or Leopard.

GFortranBinaries - GCC Wiki

I believe these builds are 32-bit only. That is, the executables you create will not take advantage of a 64-bit machine.

-Y.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top