简体   繁体   中英

OS X El Capitan and Fortran compiler error

I am very new to programming and having difficulties with creating packages in R. I'm trying to make source codes in Fortran to help me build a R package. I wrote a program in Fortran which gives me a simple epidemic, later I wrapped it as a subroutine to call from R. Now when I compile the wrapper to make it as .so file, it gives the following error.

$ R CMD SHLIB random_epi.f95

Error:

gfortran-4.8 -fPIC -Wall -g -O2 -c random_epi.f95 -o random_epi.o make: gfortran-4.8: No such file or directory make: *** [random_epi.o] Error 1

I'm using a Mac OS X El Capitan and gfortran 6.1. I have searched a lot, but couldn't find a solution. I would really appreciate any help to resolve my issue.

Solved the issue by adding few lines in the Makevar file. Refer:

OS X package installation issue: Can't find gfortran 4.8 to build package

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM