Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / ExtUtils / Mksymlists.html
blobfd5bb70ae3bce8b28546542af1de1393758cad2e
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>ExtUtils::Mksymlists - write linker options files for dynamic extension</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;ExtUtils::Mksymlists - write linker options files for dynamic extension</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#author">AUTHOR</a></li>
26 <li><a href="#revision">REVISION</a></li>
27 </ul>
28 <!-- INDEX END -->
30 <hr />
31 <p>
32 </p>
33 <h1><a name="name">NAME</a></h1>
34 <p>ExtUtils::Mksymlists - write linker options files for dynamic extension</p>
35 <p>
36 </p>
37 <hr />
38 <h1><a name="synopsis">SYNOPSIS</a></h1>
39 <pre>
40 use ExtUtils::Mksymlists;
41 Mksymlists({ NAME =&gt; $name ,
42 DL_VARS =&gt; [ $var1, $var2, $var3 ],
43 DL_FUNCS =&gt; { $pkg1 =&gt; [ $func1, $func2 ],
44 $pkg2 =&gt; [ $func3 ] });</pre>
45 <p>
46 </p>
47 <hr />
48 <h1><a name="description">DESCRIPTION</a></h1>
49 <p><code>ExtUtils::Mksymlists</code> produces files used by the linker under some OSs
50 during the creation of shared libraries for dynamic extensions. It is
51 normally called from a MakeMaker-generated Makefile when the extension
52 is built. The linker option file is generated by calling the function
53 <code>Mksymlists</code>, which is exported by default from <code>ExtUtils::Mksymlists</code>.
54 It takes one argument, a list of key-value pairs, in which the following
55 keys are recognized:</p>
56 <dl>
57 <dt><strong><a name="item_dlbase">DLBASE</a></strong>
59 <dd>
60 <p>This item specifies the name by which the linker knows the
61 extension, which may be different from the name of the
62 extension itself (for instance, some linkers add an '_' to the
63 name of the extension). If it is not specified, it is derived
64 from the NAME attribute. It is presently used only by OS2 and Win32.</p>
65 </dd>
66 </li>
67 <dt><strong><a name="item_dl_funcs">DL_FUNCS</a></strong>
69 <dd>
70 <p>This is identical to the DL_FUNCS attribute available via MakeMaker,
71 from which it is usually taken. Its value is a reference to an
72 associative array, in which each key is the name of a package, and
73 each value is an a reference to an array of function names which
74 should be exported by the extension. For instance, one might say
75 <code>DL_FUNCS =&gt; { Homer::Iliad =&gt; [ qw(trojans greeks) ],
76 Homer::Odyssey =E&lt;gt&gt; [ qw(travellers family suitors) ] }</code>. The
77 function names should be identical to those in the XSUB code;
78 <code>Mksymlists</code> will alter the names written to the linker option
79 file to match the changes made by <em>xsubpp</em>. In addition, if
80 none of the functions in a list begin with the string <strong>boot_</strong>,
81 <code>Mksymlists</code> will add a bootstrap function for that package,
82 just as xsubpp does. (If a <strong>boot_&lt;pkg&gt;</strong> function is
83 present in the list, it is passed through unchanged.) If
84 DL_FUNCS is not specified, it defaults to the bootstrap
85 function for the extension specified in NAME.</p>
86 </dd>
87 </li>
88 <dt><strong><a name="item_dl_vars">DL_VARS</a></strong>
90 <dd>
91 <p>This is identical to the DL_VARS attribute available via MakeMaker,
92 and, like DL_FUNCS, it is usually specified via MakeMaker. Its
93 value is a reference to an array of variable names which should
94 be exported by the extension.</p>
95 </dd>
96 </li>
97 <dt><strong><a name="item_file">FILE</a></strong>
99 <dd>
100 <p>This key can be used to specify the name of the linker option file
101 (minus the OS-specific extension), if for some reason you do not
102 want to use the default value, which is the last word of the NAME
103 attribute (<em>e.g.</em> for <code>Tk::Canvas</code>, FILE defaults to <code>Canvas</code>).</p>
104 </dd>
105 </li>
106 <dt><strong><a name="item_funclist">FUNCLIST</a></strong>
108 <dd>
109 <p>This provides an alternate means to specify function names to be
110 exported from the extension. Its value is a reference to an
111 array of function names to be exported by the extension. These
112 names are passed through unaltered to the linker options file.
113 Specifying a value for the FUNCLIST attribute suppresses automatic
114 generation of the bootstrap function for the package. To still create
115 the bootstrap name you have to specify the package name in the
116 DL_FUNCS hash:</p>
117 </dd>
118 <dd>
119 <pre>
120 Mksymlists({ NAME =&gt; $name ,
121 FUNCLIST =&gt; [ $func1, $func2 ],
122 DL_FUNCS =&gt; { $pkg =&gt; [] } });</pre>
123 </dd>
124 </li>
125 <dt><strong><a name="item_imports">IMPORTS</a></strong>
127 <dd>
128 <p>This attribute is used to specify names to be imported into the
129 extension. It is currently only used by OS/2 and Win32.</p>
130 </dd>
131 </li>
132 <dt><strong><a name="item_name">NAME</a></strong>
134 <dd>
135 <p>This gives the name of the extension (<em>e.g.</em> <code>Tk::Canvas</code>) for which
136 the linker option file will be produced.</p>
137 </dd>
138 </li>
139 </dl>
140 <p>When calling <code>Mksymlists</code>, one should always specify the NAME
141 attribute. In most cases, this is all that's necessary. In
142 the case of unusual extensions, however, the other attributes
143 can be used to provide additional information to the linker.</p>
145 </p>
146 <hr />
147 <h1><a name="author">AUTHOR</a></h1>
148 <p>Charles Bailey <em>&lt;<a href="mailto:bailey@newman.upenn.edu">bailey@newman.upenn.edu</a>&gt;</em></p>
150 </p>
151 <hr />
152 <h1><a name="revision">REVISION</a></h1>
153 <p>Last revised 14-Feb-1996, for Perl 5.002.</p>
154 <table border="0" width="100%" cellspacing="0" cellpadding="3">
155 <tr><td class="block" style="background-color: #cccccc" valign="middle">
156 <big><strong><span class="block">&nbsp;ExtUtils::Mksymlists - write linker options files for dynamic extension</span></strong></big>
157 </td></tr>
158 </table>
160 </body>
162 </html>