Hi, I'm trying to write an R package that calls a Fortran subroutine on my Mac os x El Capitan with Xcode 7 and gfortran 6.1, R 3.3.0. I can build and load the library but when I try to use it in R I get this error: >library(NEpidemic) >random_epi(variable_names)
Error in .Fortran("random_epi", : "random_pi" not resolved from current namespace (NEpidemic). Then I tried adding useDynLib(random_epi.f95) in the NAMESPACE file, additional to useDynLib(NEpidemic). After doing that I couldn't build the package and it gave me another error: Error in library.dynam(lib, package, package.lib) : shared object ‘random_epi.so’ not found Error: loading failed Execution halted ERROR: loading failed When I checked my src folder, there is only random_epi.o file. How can I fix this issue? Any help would be much appreciated. I'm vey new to both R and Fortran coding, especially in package building. Thanks in advance! Vineetha [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.