1ExtUtils::Mksymlists(3pmP)erl Programmers Reference GuidEextUtils::Mksymlists(3pm)
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 follow‐
22       ing keys are recognized:
23
24       DLBASE
25           This item specifies the name by which the linker knows the exten‐
26           sion, which may be different from the name of the extension itself
27           (for instance, some linkers add an '_' to the name of the exten‐
28           sion).  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 Make‐
33           Maker, from which it is usually taken.  Its value is a reference to
34           an associative array, in which each key is the name of a package,
35           and each value is an a reference to an array of function names
36           which should be exported by the extension.  For instance, one might
37           say "DL_FUNCS => { Homer::Iliad => [ qw(trojans greeks) ],
38           Homer::Odyssey => [ qw(travellers family suitors) ] }".  The func‐
39           tion names should be identical to those in the XSUB code; "Mksym‐
40           lists" will alter the names written to the linker option file to
41           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 boot‐
67           strap 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.8.8                       2001-09-21         ExtUtils::Mksymlists(3pm)
Impressum