SHLIB                 package:utils                 R Documentation

_B_u_i_l_d _S_h_a_r_e_d _O_b_j_e_c_t/_D_L_L _f_o_r _D_y_n_a_m_i_c _L_o_a_d_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Compile the given source files and then link all specified object
     files into a shared library aka DLL which can be loaded into R
     using 'dyn.load' or 'library.dynam'.

_U_s_a_g_e:

     R CMD SHLIB [options] [-o dllname] files

_A_r_g_u_m_e_n_t_s:

   files: a list specifying the object files to be included in the
          shared object/DLL.  You can also include the name of source
          files (for which the object files are automagically made from
          their sources) and library linking commands. 

 dllname: the full name of the shared object/DLL to be built, including
          the extension (typically '.so' on Unix systems, and '.dll' on
          Windows).  If not given, the basename of the object is taken
          from the basename of the first file.

 options: Further options to control the processing.  Use 'R CMD SHLIB
          --help' for a current list. 

_D_e_t_a_i_l_s:

     'R CMD SHLIB' is the mechanism used by 'INSTALL' to compile source
     code in packages.  It will generate suitable compilation commands
     for C, C++, ObjC(++) and Fortran sources: Fortran 90/95 sources
     can also be used but it may not be possible to mix these with
     other langauges (on most platforms it is possible to mix with C,
     but mixing with C++ rarely works).

     Please consult section 'Creating shared objects' in the manual
     'Writing R Extensions' for how to customize it (for example to add
     'cpp' flags and to add libraries to the link step) and for details
     of some of its quirks.

     Items in 'files' with extensions '.c', '.cpp', '.cc', '.C', '.f',
     '.f90', '.f95', '.m' (ObjC), '.M' and '.mm' (ObjC++) are regarded
     as source files, and those with extension '.o' as object files. 
     All other items are passed to the linker.

     Option '-n' (also known as '--dry-run') will show the commands
     that would be run without actually executing them.

_N_o_t_e:

     Some binary distributions of R have 'SHLIB' in a separate bundle,
     e.g., an 'R-devel' RPM.

_S_e_e _A_l_s_o:

     'COMPILE', 'dyn.load', 'library.dynam'.

     The section on "Customizing compilation" in the "R Administration
     and Installation" manual (see the 'doc/manual' subdirectory of the
     R source tree).

     The 'R Installation and Administration' and 'Writing R 
     Extensions' manuals.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     R CMD SHLIB -o mylib.so a.f b.f -L/opt/acml3.5.0/gnu64/lib -lacml
     ## End(Not run)

