title: Error while trying to create shared library
body: <p>I am trying to create the shared library (.so) so that I can call it using .External command from R for the lassoshooting package:
  <a href="https://cran.r-project.org/web/packages/lassoshooting/" rel="nofollow">https://cran.r-project.org/web/packages/lassoshooting/</a></p>
  
  <p>Basically, I have downloaded the package source from the above website. However, when I go the the correct directory (.../lassoshooting/src) and use the command</p>
  
  <pre><code>R CMD SHLIB -o ccd_r.so ccd_r.c 
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>clang -dynamiclib -Wl,-headerpad_max_install_names -undefined
    dynamic_lookup -single_module -multiply_defined suppress
    -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o ccd_r.so ccd_r.o -L/Library/Frameworks/R.framework/Resources/lib
    -lRblas -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation</p>
    
    <p>ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'<br>
    ld: library not found for -lgfortran<br>
    clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [ccd_r.so] Error 1</p>
  </blockquote>
  
  <p>Why is this happening?</p>