I'm having a terrible time getting Net::LibIDN to work in Windows via ActivePerl. Is this even possible? The GNU Libidn site claims it works in Windows, so it seems that it should be.

None of the PPM repositories seem to have it (they all list it as buggy/failed) and I can't get it to build via CPAN. (Though I can build pretty much any other module I need)

The error I'm getting during build:

CPAN.pm: Going to build T/TH/THOR/Net-LibIDN-0.11.tar.gz Set up gcc environment - 3.4.5 (mingw-vista special r3) 'cc' is not recognized as an internal or external command, operable program or batch file. __test1.c:1:18: idna.h: No such file or directory This module requires GNU Libidn, which could not be found. THOR/Net-LibIDN-0.11.tar.gz C:\Perl\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NO Makefile cre +ated Running make test Make had some problems, won't test Running make install Make had some problems, won't install

Now, I know it needs GNU Libidn, but how do I go about making this happen? Do I just need to make the code available somehow, or do I have to fully install GNU Libidn? And if I have to install it, will I have to install it on every Windows computer that runs a copy of my code?

Edit: Update on errors: (downloaded libidn from GNU site and extracted it into subfolder named libidn-1.9 in the cwd)

C:\Perl\cpan\build\Net-LibIDN-0.11-QaNUHQ>perl Makefile.PL --with-libi +dn=libidn- 1.9 --with-libidn-inc=libidn-1.9\lib Set up gcc environment - 3.4.5 (mingw-vista special r3) In file included from __test1.c:1: libidn-1.9/lib/idna.h:31:38: idn-int.h: No such file or directory In file included from __test1.c:1: libidn-1.9/lib/idna.h:67: error: syntax error before '*' token libidn-1.9/lib/idna.h:69: error: syntax error before '*' token libidn-1.9/lib/idna.h:74: error: syntax error before '*' token libidn-1.9/lib/idna.h:82: error: syntax error before '*' token libidn-1.9/lib/idna.h:86: error: syntax error before "uint32_t" This module requires GNU Libidn, which could not be found.

Thanks a ton, in advance.


While I ask a lot of Win32 questions, I hate Windows with a passion. That's the problem with writing a cross-platform program. I'm a Linux user myself. I wish more people were.
If you want to do evil, science provides the most powerful weapons to do evil; but equally, if you want to do good, science puts into your hands the most powerful tools to do so.
- Richard Dawkins

In reply to Net::LibIDN in Windows, is it possible? by wilsond

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.