Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Eclipse Scientific Can't Build helloworld.f90 on macOS Big Sur

In my experience you have to specify the path to the compiler.  So, when creating a Fortran project in Eclipse specify this location in project properties:

Project > Properties > Fortran Build > Settings > Tool Settings > GNU Fortran compiler > command >

      insert          /usr/local/gfortran/bin/gfortran

see below, and

Project > Properties > Fortran Build > Settings > Tool Settings > Mac OS X Fortran linker > command >

      insert          /usr/local/gfortran/bin/gfortran

 Need to Clean / Build before run

Hope this helps.

Bernard Abramson

Screen Shot 2021-03-29 at 8.55.20 PM.jpg

On Mar 29, 2021, at 8:50 PM, Robert Lockwood <rnlockwood@xxxxxxxxx> wrote:
I have followed the getting started instructions for the hello world .f90 code but it won't build on my macBook Pro; it appears to me that it can't find gfortran.

Using the default zsh terminal 
  'which gfortran' returns /usr/local/bin/gfortran
  'which make' returns /usr/bin/make 

This is what build returns
  make all 
  Building file: ../hello.f90
  /bin/sh: gfortran: command not found
  Invoking: GNU Fortran Compiler
  gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o "hello.o" "../hello.f90"
  make: *** [hello.o] Error 127
  "make all" terminated with exit code 2. Build might be incomplete.

hello.o is not created.

Invoking the gfortran line from the debug folder using terminal works just fine.  Dr. Google has not been helpful.

How can I fix this?


_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/photran

Back to the top