1ExtUtils::Mksymlists(3)User Contributed Perl DocumentatioEnxtUtils::Mksymlists(3)
2
3
4

NAME

6       ExtUtils::Mksymlists - write linker options files for dynamic extension
7

SYNOPSIS

9           use ExtUtils::Mksymlists;
10           Mksymlists(  NAME     => $name ,
11                        DL_VARS  => [ $var1, $var2, $var3 ],
12                        DL_FUNCS => { $pkg1 => [ $func1, $func2 ],
13                                      $pkg2 => [ $func3 ] );
14

DESCRIPTION

16       "ExtUtils::Mksymlists" produces files used by the linker under some OSs
17       during the creation of shared libraries for dynamic extensions.  It is
18       normally called from a MakeMaker-generated Makefile when the extension
19       is built.  The linker option file is generated by calling the function
20       "Mksymlists", which is exported by default from "ExtUtils::Mksymlists".
21       It takes one argument, a list of key-value pairs, in which the
22       following keys are recognized:
23
24       DLBASE
25           This item specifies the name by which the linker knows the
26           extension, which may be different from the name of the extension
27           itself (for instance, some linkers add an '_' to the name of the
28           extension).  If it is not specified, it is derived from the NAME
29           attribute.  It is presently used only by OS2 and Win32.
30
31       DL_FUNCS
32           This is identical to the DL_FUNCS attribute available via
33           MakeMaker, from which it is usually taken.  Its value is a
34           reference to an associative array, in which each key is the name of
35           a package, and each value is an a reference to an array of function
36           names which should be exported by the extension.  For instance, one
37           might say "DL_FUNCS => { Homer::Iliad => [ qw(trojans greeks) ],
38           Homer::Odyssey => [ qw(travellers family suitors) ] }".  The
39           function names should be identical to those in the XSUB code;
40           "Mksymlists" will alter the names written to the linker option file
41           to match the changes made by xsubpp.  In addition, if none of the
42           functions in a list begin with the string boot_, "Mksymlists" will
43           add a bootstrap function for that package, just as xsubpp does.
44           (If a boot_<pkg> function is present in the list, it is passed
45           through unchanged.)  If DL_FUNCS is not specified, it defaults to
46           the bootstrap function for the extension specified in NAME.
47
48       DL_VARS
49           This is identical to the DL_VARS attribute available via MakeMaker,
50           and, like DL_FUNCS, it is usually specified via MakeMaker.  Its
51           value is a reference to an array of variable names which should be
52           exported by the extension.
53
54       FILE
55           This key can be used to specify the name of the linker option file
56           (minus the OS-specific extension), if for some reason you do not
57           want to use the default value, which is the last word of the NAME
58           attribute (e.g. for "Tk::Canvas", FILE defaults to "Canvas").
59
60       FUNCLIST
61           This provides an alternate means to specify function names to be
62           exported from the extension.  Its value is a reference to an array
63           of function names to be exported by the extension.  These names are
64           passed through unaltered to the linker options file.  Specifying a
65           value for the FUNCLIST attribute suppresses automatic generation of
66           the bootstrap function for the package. To still create the
67           bootstrap name you have to specify the package name in the DL_FUNCS
68           hash:
69
70               Mksymlists(  NAME     => $name ,
71                            FUNCLIST => [ $func1, $func2 ],
72                            DL_FUNCS => { $pkg => [] } );
73
74       IMPORTS
75           This attribute is used to specify names to be imported into the
76           extension. It is currently only used by OS/2 and Win32.
77
78       NAME
79           This gives the name of the extension (e.g. "Tk::Canvas") for which
80           the linker option file will be produced.
81
82       When calling "Mksymlists", one should always specify the NAME
83       attribute.  In most cases, this is all that's necessary.  In the case
84       of unusual extensions, however, the other attributes can be used to
85       provide additional information to the linker.
86

AUTHOR

88       Charles Bailey <bailey@newman.upenn.edu>
89

REVISION

91       Last revised 14-Feb-1996, for Perl 5.002.
92
93
94
95perl v5.34.0                      2021-07-22           ExtUtils::Mksymlists(3)
Impressum