.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' '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 >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::LibBuilder 3pm" .TH ExtUtils::LibBuilder 3pm 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" 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 ExtUtils::LibBuilder \- A tool to build C libraries. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use ExtUtils::LibBuilder; \& my $libbuilder = ExtUtils::LibBuilder\->new( %options ); .Ve .SH METHODS .IX Header "METHODS" Supports all the method from ExtUtils::CBuilder. The following three methods were adapted to be used in standalone C libraries. .SS new .IX Subsection "new" This method creates a new ExtUtils::LibBuilder object. While it supports all \f(CW\*(C`ExtUtils::CBuilder\*(C'\fR methods some might work slightly differently (namely the two below). .PP You can supply to the constructor any option recognized by \&\f(CW\*(C`ExtUtils::CBuilder\*(C'\fR constructor. None of them will be used by \&\f(CW\*(C`LibBuilder\*(C'\fR. .SS link .IX Subsection "link" .Vb 3 \& $libbuilder \-> link( objects => [ "foo.o", "bar.o" ], \& module_name => "foobar", \& lib_file => "libfoobar$libbuilder\->{libext}"); .Ve .PP Options to the link method are the same as the \f(CW\*(C`CBuilder\*(C'\fR counterpart. Note that the result is a standalone C Library and not a bundle to be loaded by Perl. .PP Also, note that you can use the \f(CW\*(C`libext\*(C'\fR key to retrieve from the object the common library extension on the running system (including the dot). .SS link_executable .IX Subsection "link_executable" .Vb 3 \& $libbuilder\->link_executable( objects => ["main.o"], \& extra_linker_flags => "\-L. \-lfoobar", \& exe_file => "foobarcmd$libbuilder\->{exeext}"); .Ve .PP The \f(CW\*(C`link_executable\*(C'\fR needs, as \f(CW\*(C`extra_linker_flags\*(C'\fR options, the name of the library and the search path. Future versions might include better handling on the library files. .PP Also, note that you can use the \f(CW\*(C`exeext\*(C'\fR key to retrieve from the object the common executable extension on the running system (including the dot). .SH AUTHOR .IX Header "AUTHOR" Alberto Simoes, \f(CW\*(C`\*(C'\fR .SH BUGS .IX Header "BUGS" Please report any bugs or feature requests to \&\f(CW\*(C`bug\-extutils\-libbuilder at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH SUPPORT .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc ExtUtils::LibBuilder .Ve .PP You can also look for information at: .IP \(bu 4 RT: CPAN's request tracker .Sp .IP \(bu 4 AnnoCPAN: Annotated CPAN documentation .Sp .IP \(bu 4 CPAN Ratings .Sp .IP \(bu 4 Search CPAN .Sp .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2010 Alberto Simoes. .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information.