| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "ExtUtils::Mksymlists 3perl" |
| 58 |
.TH ExtUtils::Mksymlists 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
ExtUtils::Mksymlists \- write linker options files for dynamic extension |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
.Vb 5 |
| 68 |
\& use ExtUtils::Mksymlists; |
| 69 |
\& Mksymlists( NAME => $name , |
| 70 |
\& DL_VARS => [ $var1, $var2, $var3 ], |
| 71 |
\& DL_FUNCS => { $pkg1 => [ $func1, $func2 ], |
| 72 |
\& $pkg2 => [ $func3 ] ); |
| 73 |
.Ve |
| 74 |
.SH DESCRIPTION |
| 75 |
.IX Header "DESCRIPTION" |
| 76 |
\&\f(CW\*(C`ExtUtils::Mksymlists\*(C'\fR produces files used by the linker under some OSs |
| 77 |
during the creation of shared libraries for dynamic extensions. It is |
| 78 |
normally called from a MakeMaker-generated Makefile when the extension |
| 79 |
is built. The linker option file is generated by calling the function |
| 80 |
\&\f(CW\*(C`Mksymlists\*(C'\fR, which is exported by default from \f(CW\*(C`ExtUtils::Mksymlists\*(C'\fR. |
| 81 |
It takes one argument, a list of key-value pairs, in which the following |
| 82 |
keys are recognized: |
| 83 |
.IP DLBASE 4 |
| 84 |
.IX Item "DLBASE" |
| 85 |
This item specifies the name by which the linker knows the |
| 86 |
extension, which may be different from the name of the |
| 87 |
extension itself (for instance, some linkers add an '_' to the |
| 88 |
name of the extension). If it is not specified, it is derived |
| 89 |
from the NAME attribute. It is presently used only by OS2 and Win32. |
| 90 |
.IP DL_FUNCS 4 |
| 91 |
.IX Item "DL_FUNCS" |
| 92 |
This is identical to the DL_FUNCS attribute available via MakeMaker, |
| 93 |
from which it is usually taken. Its value is a reference to an |
| 94 |
associative array, in which each key is the name of a package, and |
| 95 |
each value is an a reference to an array of function names which |
| 96 |
should be exported by the extension. For instance, one might say |
| 97 |
\&\f(CW\*(C`DL_FUNCS => { Homer::Iliad => [ qw(trojans greeks) ], |
| 98 |
Homer::Odyssey => [ qw(travellers family suitors) ] }\*(C'\fR. The |
| 99 |
function names should be identical to those in the XSUB code; |
| 100 |
\&\f(CW\*(C`Mksymlists\*(C'\fR will alter the names written to the linker option |
| 101 |
file to match the changes made by \fIxsubpp\fR. In addition, if |
| 102 |
none of the functions in a list begin with the string \fBboot_\fR, |
| 103 |
\&\f(CW\*(C`Mksymlists\*(C'\fR will add a bootstrap function for that package, |
| 104 |
just as xsubpp does. (If a \fBboot_<pkg>\fR function is |
| 105 |
present in the list, it is passed through unchanged.) If |
| 106 |
DL_FUNCS is not specified, it defaults to the bootstrap |
| 107 |
function for the extension specified in NAME. |
| 108 |
.IP DL_VARS 4 |
| 109 |
.IX Item "DL_VARS" |
| 110 |
This is identical to the DL_VARS attribute available via MakeMaker, |
| 111 |
and, like DL_FUNCS, it is usually specified via MakeMaker. Its |
| 112 |
value is a reference to an array of variable names which should |
| 113 |
be exported by the extension. |
| 114 |
.IP FILE 4 |
| 115 |
.IX Item "FILE" |
| 116 |
This key can be used to specify the name of the linker option file |
| 117 |
(minus the OS-specific extension), if for some reason you do not |
| 118 |
want to use the default value, which is the last word of the NAME |
| 119 |
attribute (\fIe.g.\fR for \f(CW\*(C`Tk::Canvas\*(C'\fR, FILE defaults to \f(CW\*(C`Canvas\*(C'\fR). |
| 120 |
.IP FUNCLIST 4 |
| 121 |
.IX Item "FUNCLIST" |
| 122 |
This provides an alternate means to specify function names to be |
| 123 |
exported from the extension. Its value is a reference to an |
| 124 |
array of function names to be exported by the extension. These |
| 125 |
names are passed through unaltered to the linker options file. |
| 126 |
Specifying a value for the FUNCLIST attribute suppresses automatic |
| 127 |
generation of the bootstrap function for the package. To still create |
| 128 |
the bootstrap name you have to specify the package name in the |
| 129 |
DL_FUNCS hash: |
| 130 |
.Sp |
| 131 |
.Vb 3 |
| 132 |
\& Mksymlists( NAME => $name , |
| 133 |
\& FUNCLIST => [ $func1, $func2 ], |
| 134 |
\& DL_FUNCS => { $pkg => [] } ); |
| 135 |
.Ve |
| 136 |
.IP IMPORTS 4 |
| 137 |
.IX Item "IMPORTS" |
| 138 |
This attribute is used to specify names to be imported into the |
| 139 |
extension. It is currently only used by OS/2 and Win32. |
| 140 |
.IP NAME 4 |
| 141 |
.IX Item "NAME" |
| 142 |
This gives the name of the extension (\fIe.g.\fR \f(CW\*(C`Tk::Canvas\*(C'\fR) for which |
| 143 |
the linker option file will be produced. |
| 144 |
.PP |
| 145 |
When calling \f(CW\*(C`Mksymlists\*(C'\fR, one should always specify the NAME |
| 146 |
attribute. In most cases, this is all that's necessary. In |
| 147 |
the case of unusual extensions, however, the other attributes |
| 148 |
can be used to provide additional information to the linker. |
| 149 |
.SH AUTHOR |
| 150 |
.IX Header "AUTHOR" |
| 151 |
Charles Bailey \fI<[email protected]>\fR |
| 152 |
.SH REVISION |
| 153 |
.IX Header "REVISION" |
| 154 |
Last revised 14\-Feb\-1996, for Perl 5.002. |