I'm running a late 2011 13" MacBook Pro with a 2.7 GHz Intel Core i7 processor and OS-X 10.7.4
Today I downloaded XCode via the Mac App Store and successfully installed it with a default install and no error messages.
I also downloaded and successfully executed the gfortran apple installer (version 4.6.2) for OX Lion (10.7) - installer released 2011-10-20 from the GCC website.
I then went into my user directory via the Terminal, and found there was no ".bash_profile" file. So I created one with a single line (followed by a carriage return). The single line is:
"export PATH=/usr/local/binPATH"
I restarted my computer at this point.
I then created a simple fortran text file (named hiworld.f77 and saved as text), that reads:
PROGRAM HIWORLD
WRITE(UNIT=*, FMT=*) 'Hello World'
END
When I try to compile the code (from within the directory the hiworld.f77 source code is in) with the following statement from the Terminal,
gfortran hiworld.f77 -o hiworld
I receive the following error message from the Terminal:
"collect2: cannot find 'ld'
I get the same error message if I attempt to compile with the following command:
/usr/local/bin/gfortran hiworld.f77 -o hiworld
WHAT AM I DOING WRONG?
Today I downloaded XCode via the Mac App Store and successfully installed it with a default install and no error messages.
I also downloaded and successfully executed the gfortran apple installer (version 4.6.2) for OX Lion (10.7) - installer released 2011-10-20 from the GCC website.
I then went into my user directory via the Terminal, and found there was no ".bash_profile" file. So I created one with a single line (followed by a carriage return). The single line is:
"export PATH=/usr/local/binPATH"
I restarted my computer at this point.
I then created a simple fortran text file (named hiworld.f77 and saved as text), that reads:
PROGRAM HIWORLD
WRITE(UNIT=*, FMT=*) 'Hello World'
END
When I try to compile the code (from within the directory the hiworld.f77 source code is in) with the following statement from the Terminal,
gfortran hiworld.f77 -o hiworld
I receive the following error message from the Terminal:
"collect2: cannot find 'ld'
I get the same error message if I attempt to compile with the following command:
/usr/local/bin/gfortran hiworld.f77 -o hiworld
WHAT AM I DOING WRONG?