IBM AIX用-qmkshrobj创建动态链接库
来源:互联网 发布:木工图纸设计软件 编辑:程序博客网 时间:2024/06/03 21:14
From http://publib.boulder.ibm.com/infocenter/comphelp/v9v111/index.jsp?topic=/com.ibm.xlcpp9.aix.doc/compiler_ref/opt_mkshrobj.htm
可以直接看例子
Examples
To construct the shared library big_lib.so from three smaller object files, type:
xlc -qmkshrobj -o big_lib.so lib_a.o lib_b.o lib_c.o
-qmkshrobj
Category
Output control
Pragma equivalent
None.
Purpose
Creates a shared object from generated object files.
You should use this option, together with the related options described below, instead of calling the linker directly (or using the makeC++SharedLib utility, in C++) to create a shared object. The advantages of using this option are the automatic handling of link-time C++ template instantiation (using either the template include directory or the template registry), and compatibility with -qipa link-time optimizations (such as those performed at -O5 )..
Syntax
-qmkshrobj syntax -- C >>- -q--mkshrobj-----------------------------------------------><
-qmkshrobj syntax -- C++ >>- -q--mkshrobj--+-------------+------------------------------>< '-=--priority-'
Defaults
By default, the output object is linked with the runtime libraries and startup routines to create an executable file.
Parameters
- priority
- Specifies the priority level for the initialization order of static C++ objects declared in the shared object (relative to static objects declared in other shared objects). The priority may be any number from -214 782 624 (highest priority — initialized first) to 214 783 647 (lowest priority — initialized last). Numbers from -214 783 648 to -214 782 623 are reserved for system use. If no priority is specified a default priority of 0 is used. The priority has no effect if you link shared objects written in C, if you link with the C compiler (xlc ), or if the shared object has no static initialization.
Usage
The compiler will automatically export all global symbols from the shared object unless you explicitly specify which symbols to export with the -bE :, -bexport : or -bnoexpall options, or if you use the -qnoweakexpoption to prevent weak symbols from being exported.
Specifying -qmkshrobj implies -qpic .
You can also use the following related options with the -qmkshrobj :
- -o shared_file
- The name of the file that will hold the shared file information. The default is shr.o.
- -qexpfile= filename
- Saves all exported symbols in filename .
- -e name
- Sets the entry name for the shared executable to name . The default is -enoentry .
- -q[no]weakexp
- Specifies whether symbols marked as weak (with the #pragma weak directive) are to be included in the export list. If you do not explicitly set this option, the default is -qweakexp (global weak symbols are exported).
For detailed information on using -qmkshrobj to create shared libraries, as well as examples of using -qmkshrobj with priority values, see "Constructing a library" .
Predefined macros
None.
Examples
To construct the shared library big_lib.so from three smaller object files, type:
xlc -qmkshrobj -o big_lib.so lib_a.o lib_b.o lib_c.o
Related information
- -o
- -e
- -qpriority (C++ only)
- -qpic
- -b
- -qexpfile
- -qweakexp
- IBM AIX用-qmkshrobj创建动态链接库
- 用-qmkshrobj创建动态链接库
- AIX系统中动态链接库的创建与使用
- [ZT]AIX系统中动态链接库的创建与使用
- AIX各项知识链接(IBM官网)
- 创建动态链接库
- 动态链接库 创建
- 创建动态链接库
- 创建动态链接库
- 创建动态链接库
- 创建动态链接库
- 创建动态链接库
- 在AIX平台如何创建动态库
- 用VC创建DLL动态链接库
- 动态链接库的创建
- 动态链接库的创建
- 动态链接库的创建
- 动态链接库,创建四则运算
- JS二示例
- SQL对Xml字段的操作
- java并发学习
- 开始工作后,一个人会失去什么?
- Makefile 隐式规则
- IBM AIX用-qmkshrobj创建动态链接库
- java心得---线程
- Java集合总结
- linux命令(二)
- C#概述
- 浑浑噩噩的一天
- 设计模式之适配器模式学习
- 基于Linux下的TCP编程
- 判断是否为栈的pop序列