in reply to Re^2: Net::LibIDN in Windows, is it possible?
in thread Net::LibIDN in Windows, is it possible?

Here are the current errors I get now.

It complains about idn-int.h. That file is in libidn-1.9\win32\include, not libidn-1.9\lib like idna.h is. Any ideas on how to use both directories at the same time? (I'm sure I sound like an idiot, sorry.)

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.

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

Replies are listed 'Best First'.
Re^4: Net::LibIDN in Windows, is it possible?
by almut (Canon) on Feb 05, 2009 at 16:19 UTC
    Any ideas on how to use both directories at the same time?

    Include directories (i.e. where the compiler looks for header files — in addition to the standard places) are specified via the -I option to gcc (multiple occurrences of -I are allowed).  So, the following perl Makefile.PL option should achieve the desired effect (untested, though):

    --with-libidn-inc="libidn-1.9\lib -Ilibidn-1.9\win32\include"

    Due to this snippet from Makefile.PL

    GetOptions ( ... "with-libidn-inc=s" => \$incdir, );

    the value "libidn-1.9\lib -Ilibidn-1.9\win32\include" is being assigned to $incdir, which is then interpolated here

    $Params{INC} = "-I$incdir";

    IOW, $Params{INC} now holds the two -I options, which in turn should end up in the appropriate places in the generated Makefile...

    (In case that doesn't work, you might want to try specifying absolute paths to the include directories.)

Re^4: Net::LibIDN in Windows, is it possible?
by Corion (Patriarch) on Feb 05, 2009 at 15:20 UTC

    Reading Makefile.PL, I guess you could play games like "--with-libidn=libidn-1.9 -Lc:\other\directory". Or you could edit the Makefile.PL to handle your case more gracefully. Or you could simply copy all relevant files into one directory.