Gfortran not working on osx yosemite

I recently installed fortran on my Macbook Pro in mid 2011 where OS X Yosemite is running. When I try to compile the code, I get the following:

gfortran: warning: couldn't understand kern.osversion '14.0.0 ld: library not found for -lcrt1.o collect2: error: ld returned 1 exit status

+5
source share
3 answers

This is because Mac OS X headers are not compatible with C99 / C ++ 98. See Error 61407 at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407 . This bug report contains a fix.

+1
source

Try installing the Xcode command line tools as described at http://hpc.sourceforge.net I also installed the full gcc file for Yosemite from http://hpc.sourceforge.net It seemed to solve this problem. Jtn

0
source

Install gcc and / or gfortran version 5.0 from http://hpc.sourceforge.net Works great for OS X Yosemite

0
source

Source: https://habr.com/ru/post/1205407/


All Articles