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.