SHLIB(utils)
SHLIB()所属R语言包:utils
Build Shared Object/DLL for Dynamic Loading
构建共享对象/ DLL的动态加载
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compile the given source files and then link all specified object files into a shared object aka DLL which can be loaded into R using dyn.load or library.dynam.
编译源文件,然后连接到一个共享对象又名DLL可以使用dyn.load或library.dynam加载到R的所有指定的对象文件。
用法----------Usage----------
R CMD SHLIB [options] [-o dllname] files
参数----------Arguments----------
参数: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.
指定的对象将包括在共享对象/ DLL文件列表。您还可以包括源文件库(该对象的文件被自动从源头)和连接命令的名称。
参数: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.
共享对象/ DLL,将建成包括扩展名(通常.soUnix系统上,.dll在Windows)的全名。如果没有给出,对象的基本名是从第一个文件的基本名。
参数:options
Further options to control the processing. Use R CMD SHLIB --help for a current list. The most useful one is -d to build a debug DLL.
进一步的选项控制处理。使用R CMD SHLIB --help电流名单。其中最有用的是-d建立一个调试DLL。
Details
详情----------Details----------
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 languages (on most platforms it is possible to mix with C, but mixing with C++ rarely works).
R CMD SHLIB是INSTALL包中的源代码编译所使用的机制。它会产生为C合适的编译命令+ +,ObjC(+ +)和FORTRAN来源:的Fortran 90/95的来源可以也可以使用,但它可能不会有可能以混合与其他语言的这些(在大多数平台上可以混合C,但与C + +中很少的作品混合)。
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.
请参阅节创建共享对象“手册”写R扩展为如何定义它(例如,添加cpp标志,并添加库的链接步骤)和它的一些细节怪癖。
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.
项目在files扩展.c,.cpp,.cc,.C, .f,.f90,.f95,.m(ObjC),.M ;.mm(ObjC +)被视为源文件,和扩展.o作为目标文件。所有其他项目传递给链接器。
Option -n (also known as --dry-run) will show the commands that would be run without actually executing them.
选项-n将显示没有实际执行他们将要运行的命令(也称为--dry-run)。
If there is an exports file "dllname-win.def" in the current directory it will be used, otherwise all entry points in objects (but not libraries) will be exported from the DLL.
如果有一个exports文件“dllname-win.def在当前目录将使用它,否则对象中的所有入口点(但不包括库)将会从DLL导出。
参见----------See Also----------
dyn.load, library.dynam.
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).
在节上的“R管理和安装”手册“自定义汇编”(见“”doc/manual的R源代码树的子目录)。
The "R Installation and Administration" and "Writing R Extensions" manuals.
“R安装和管理”和“写作R附加手册。
举例----------Examples----------
rcmd SHLIB -o my.dll a.f b.f -L/AMD/acml3.5.0/gnu32/lib -lacml
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|