title: R 3.1.2 dyn.load() error - %1 is not a valid Win32 application
body: <p>I'm trying to incorporate a collection of Fortran files into R for my research (files are located at <a href="http://tyrosine.usc.edu/closure" rel="nofollow noreferrer">http://tyrosine.usc.edu/closure</a>). The files have been compiled into .dll format using MinGW32's GNU Fortran compiler (4.8.1-4). I'm running 32-bit Windows 7, and 32-bit R (3.1.2) via RStudio (0.98.1028).</p>
  
  <p>Since R, Windows, and WinGW32 are 32-bit, this shouldn't be a standard 64-bit vs 32-bit problem, as suggested here:</p>
  
  <p><a href="https://stackoverflow.com/questions/4610091/not-a-valid-win32-application">Not a valid Win32 application</a></p>
  
  <p>and here:</p>
  
  <p><a href="https://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r">Using the rJava package on Win7 64 bit with R</a></p>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>dyn.load("close1.dll")
        Error in inDL(x, as.logical(local), as.logical(now), ...) : 
        unable to load shared object 'C:/Users/Morgan/Desktop/close1.dll':
        LoadLibrary failure:  %1 is not a valid Win32 application.
      nd .</p>
  </blockquote>
  
  <p>Could it be that the files need to be converted into a package first, given that there are dependencies between them?</p>
  
  <p><strong>Edit</strong>: For clarification, I am the one compiling the files into .dll. The files are .tgz compressed.</p>