Linking 'gfortran' command to compiler in gcc43
markmarkusrosin at gmail.com
Wed Oct 6 18:37:08 PDT 2010
Joshua Root <jmr <at> macports.org> writes:
> On 2010-4-24 05:41 , Andrew Lambe wrote:
> > When I first installed gcc43 through Macports, I noticed that the command
gfortran was undefined, even
> though gfortran comes with the package (for some reason gcc did work as
expected.) To compensate, I
> downloaded gfortran separately using a precompiled binary. I found out too
late that gfortran was
> disguised as 'gfortran-mp-4.3' and now I would like to link the gfortran
command to that executable.
> (Note that the gfortran binary is currently in /usr/local/bin and is called
> > 1) How can I link the command 'gfortran' to the Macports executable?
> Install the gcc_select port.
> > 2) Is there an easy way to check if e.g. the 'gcc' command is linked to the
Macports executable and not
> something else like Xcode?
> ls -l `which gcc`
> - Josh
A follow up question to this.
I installed the developer tools on my mac thinking gfortran would come with it.
Then, not being able to find it amongst the developer tools or on macports I
also downloaded the binary.
As I understand now it, it was there in gcc (which in fact "contains" gfortran).
Therefore if I have gcc then presumably I don't need to go get gfortran. So a
couple of questions:
1) What is the difference between gfortran vs gcc vs gfortran-mp-*.*?
2) If nothing, why do people download gfortran?
3) Since gcc comes with the mac's developer tools, why use macports (is it
because it's easier to keep up to date).
4) Finally, what's the best course of action in terms of getting rid of clutter
and having the best compiler(s)?
More information about the macports-users