📄 h2xs.1
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "H2XS 1".TH H2XS 1 "2008-01-23" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"h2xs \- convert .h C header files to Perl extensions.SH "SYNOPSIS".IX Header "SYNOPSIS"\&\fBh2xs\fR [\fB\s-1OPTIONS\s0\fR ...] [headerfile ... [extra_libraries]].PP\&\fBh2xs\fR \fB\-h\fR|\fB\-?\fR|\fB\-\-help\fR.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\fIh2xs\fR builds a Perl extension from C header files. The extensionwill include functions which can be used to retrieve the value of any#define statement which was in the C header files..PPThe \fImodule_name\fR will be used for the name of the extension. Ifmodule_name is not supplied then the name of the first header filewill be used, with the first character capitalized..PPIf the extension might need extra libraries, they should be includedhere. The extension Makefile.PL will take care of checking whetherthe libraries actually exist and how they should be loaded. The extralibraries should be specified in the form \-lm \-lposix, etc, just as onthe cc command line. By default, the Makefile.PL will search throughthe library path determined by Configure. That path can be augmentedby including arguments of the form \fB\-L/another/library/path\fR in theextra-libraries argument..PPIn spite of its name, \fIh2xs\fR may also be used to create a skeleton purePerl module. See the \fB\-X\fR option..SH "OPTIONS".IX Header "OPTIONS".IP "\fB\-A\fR, \fB\-\-omit\-autoload\fR" 5.IX Item "-A, --omit-autoload"Omit all autoload facilities. This is the same as \fB\-c\fR but alsoremoves the \f(CW\*(C`use\ AutoLoader\*(C'\fR statement from the .pm file..IP "\fB\-B\fR, \fB\-\-beta\-version\fR" 5.IX Item "-B, --beta-version"Use an alpha/beta style version number. Causes version number tobe \*(L"0.00_01\*(R" unless \fB\-v\fR is specified..IP "\fB\-C\fR, \fB\-\-omit\-changes\fR" 5.IX Item "-C, --omit-changes"Omits creation of the \fIChanges\fR file, and adds a \s-1HISTORY\s0 section tothe \s-1POD\s0 template..IP "\fB\-F\fR, \fB\-\-cpp\-flags\fR=\fIaddflags\fR" 5.IX Item "-F, --cpp-flags=addflags"Additional flags to specify to C preprocessor when scanning header forfunction declarations. Writes these options in the generated \fIMakefile.PL\fRtoo..IP "\fB\-M\fR, \fB\-\-func\-mask\fR=\fIregular expression\fR" 5.IX Item "-M, --func-mask=regular expression"selects functions/macros to process..IP "\fB\-O\fR, \fB\-\-overwrite\-ok\fR" 5.IX Item "-O, --overwrite-ok"Allows a pre-existing extension directory to be overwritten..IP "\fB\-P\fR, \fB\-\-omit\-pod\fR" 5.IX Item "-P, --omit-pod"Omit the autogenerated stub \s-1POD\s0 section..IP "\fB\-X\fR, \fB\-\-omit\-XS\fR" 5.IX Item "-X, --omit-XS"Omit the \s-1XS\s0 portion. Used to generate a skeleton pure Perl module.\&\f(CW\*(C`\-c\*(C'\fR and \f(CW\*(C`\-f\*(C'\fR are implicitly enabled..IP "\fB\-a\fR, \fB\-\-gen\-accessors\fR" 5.IX Item "-a, --gen-accessors"Generate an accessor method for each element of structs and unions. Thegenerated methods are named after the element name; will return the currentvalue of the element if called without additional arguments; and will setthe element to the supplied value (and return the new value) if called withan additional argument. Embedded structures and unions are returned as apointer rather than the complete structure, to facilitate chained calls..SpThese methods all apply to the Ptr type for the structure; additionallytwo methods are constructed for the structure type itself, \f(CW\*(C`_to_ptr\*(C'\fRwhich returns a Ptr type pointing to the same structure, and a \f(CW\*(C`new\*(C'\fRmethod to construct and return a new structure, initialised to zeroes..IP "\fB\-b\fR, \fB\-\-compat\-version\fR=\fIversion\fR" 5.IX Item "-b, --compat-version=version"Generates a .pm file which is backwards compatible with the specifiedperl version..SpFor versions < 5.6.0, the changes are. \- no use of 'our' (uses 'use vars' instead) \- no 'use warnings'.SpSpecifying a compatibility version higher than the version of perl youare using to run h2xs will have no effect. If unspecified h2xs will defaultto compatibility with the version of perl you are using to run h2xs..IP "\fB\-c\fR, \fB\-\-omit\-constant\fR" 5.IX Item "-c, --omit-constant"Omit \f(CW\*(C`constant()\*(C'\fR from the .xs file and corresponding specialised\&\f(CW\*(C`AUTOLOAD\*(C'\fR from the .pm file..IP "\fB\-d\fR, \fB\-\-debugging\fR" 5.IX Item "-d, --debugging"Turn on debugging messages..IP "\fB\-e\fR, \fB\-\-omit\-enums\fR=[\fIregular expression\fR]" 5.IX Item "-e, --omit-enums=[regular expression]"If \fIregular expression\fR is not given, skip all constants that are defined ina C enumeration. Otherwise skip only those constants that are defined in anenum whose name matches \fIregular expression\fR..SpSince \fIregular expression\fR is optional, make sure that this switch is followedby at least one other switch if you omit \fIregular expression\fR and have somepending arguments such as header-file names. This is ok:.Sp.Vb 1\& h2xs \-e \-n Module::Foo foo.h.Ve.SpThis is not ok:.Sp.Vb 1\& h2xs \-n Module::Foo \-e foo.h.Ve.SpIn the latter, foo.h is taken as \fIregular expression\fR..IP "\fB\-f\fR, \fB\-\-force\fR" 5.IX Item "-f, --force"Allows an extension to be created for a header even if that header isnot found in standard include directories..IP "\fB\-g\fR, \fB\-\-global\fR" 5.IX Item "-g, --global"Include code for safely storing static data in the .xs file.Extensions that do no make use of static data can ignore this option..IP "\fB\-h\fR, \fB\-?\fR, \fB\-\-help\fR" 5.IX Item "-h, -?, --help"Print the usage, help and version for this h2xs and exit..IP "\fB\-k\fR, \fB\-\-omit\-const\-func\fR" 5.IX Item "-k, --omit-const-func"For function arguments declared as \f(CW\*(C`const\*(C'\fR, omit the const attribute in thegenerated \s-1XS\s0 code..IP "\fB\-m\fR, \fB\-\-gen\-tied\-var\fR" 5.IX Item "-m, --gen-tied-var"\&\fBExperimental\fR: for each variable declared in the header file(s), declarea perl variable of the same name magically tied to the C variable..IP "\fB\-n\fR, \fB\-\-name\fR=\fImodule_name\fR" 5.IX Item "-n, --name=module_name"Specifies a name to be used for the extension, e.g., \-n\ \s-1RPC::DCE\s0.IP "\fB\-o\fR, \fB\-\-opaque\-re\fR=\fIregular expression\fR" 5.IX Item "-o, --opaque-re=regular expression"Use \*(L"opaque\*(R" data type for the C types matched by the regularexpression, even if these types are \f(CW\*(C`typedef\*(C'\fR\-equivalent to typesfrom typemaps. Should not be used without \fB\-x\fR..Sp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -