And if I have to install it, will I have to install it on every Windows computer that runs a copy of my code?If you build against a static libidn library, then the libidn functionality will be built into the Net::LibIDN binaries, and you won't have to distribute anything other than your build of Net::LibIDN. But if you build against a shared libidn library (dll) then you'll have to distribute the dll as well as your build of Net::LibIDN.
I find that libidn-1.12 builds fine as a static library (didn't test a shared build) using MinGW in the MSYS shell. Just run
./configure --disable-shared --enable-static LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include followed by
make && make check then
make install. Note that libiconv, which can be built using the same mantra, is also required.
Here's a diff showing the hack I made to the Makefile.PL in order to build Net::LibIDN-0.11:
C:\>diff -u Makefile.PL_orig Makefile.PL
--- Makefile.PL_orig Fri Feb 6 10:40:08 2009
+++ Makefile.PL Fri Feb 6 10:40:45 2009
@@ -46,18 +46,18 @@
"disable-tld" => \$disable_tld
);
- if ($libdir)
+ if (1)
{
- $Params{LIBS} = "-L$libdir -lidn";
+ $Params{LIBS} = "-LC:/_32/msys/1.0/local/lib -lidn -li
+conv";
}
else
{
$Params{LIBS} = '-lidn';
}
- if ($incdir)
+ if (1)
{
- $Params{INC} = "-I$incdir";
+ $Params{INC} = "-IC:/_32/msys/1.0/local/include";
}
else
{
@@ -164,7 +164,7 @@
return 0;
}
- foreach my $cc (qw/cc gcc/)
+ foreach my $cc (qw/gcc/)
{
unlink($test);
system "$cc $cflags -o $test $test.c $ldflags";
Unfortunately the tests fail with "Free to wrong pool..." errors, perhaps the result of bad practices used in the XS file. I'll see if I can patch the XS file so that the tests pass - and I'll post again to this thread when (if) I succeed.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.