user2219195
user2219195

Reputation: 89

Installing Curl for Perl (WWW::Curl::Easy) on Windows

I am running Strawberry Perl on Windows and need to use WWW::Curl::Easy. But "Sorry, no automated install is available on Windows".

There is a README.Win32 on CPAN:

Installation on Windows need to be done manually, by editing Makefile.PL.

1. Specify your curl include directory on the line "my @include = qw()".
2. Specify the following parameters on the line below, where <DIR> is your curl directory like this:

my ($cflags,$ldflags,$lflags) = ('-I"<DIR>\\include"', '-L"<DIR>\\lib"','-lcurl -lcurldll');

<DIR> can be for example: "E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32" (without quotes);
3. Save Makefile.PL.
4. Execute "perl Makefile.PL";
5. Execute "nmake" ( you may need nmake from Mircosoft, which can be downloaded from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084 );
6. Execute "nmake install".

Unfortunately, I do not understand how I need to do that. I guess it should be possible with dmake instead of nmake, right? What is meant by the different "include directories"?

Steps taken so far:

Can someone please give an example for the installation steps?

Any help is much appreciated ! Thank you.

Upvotes: 6

Views: 2745

Answers (1)

Paul Grove
Paul Grove

Reputation: 248

To answer your questions:

dmake is a port of GNU make, and is not a drop in replacement for Microsoft's nmake, I would use nmake as instructed.

By different include directories I assume your referring to the $cflags variable which you include -I<DIR>\\include and also the @include array where you also include the same path - as instructed by the README.Win32 file.

Reading the Makefile.PL, I can see that the @include is actually populated by the $cflags variable anyway, as such I see no reason to modify both the @include and the $cflags, though at the same time there is no harm specifying your path in both places.

Ultimately the @include array is searched, the presence of a directory which contains the curl header file /curl/curl.h if found, is used to build the perl module.

The instructions given are all that should be needed, please specify your current error, the instructions don't mention editing curl.xs what work are you doing on this file?

As an aside, I don't know what your requirements are, but the LWP::Useragent module I find is easier to install cross platform, and provides most if not all of the functionality of WWW:Curl::Easy and more.

If you are still having problems, please provide details of the errors you are receiving in your question.

Gook Luck.

Upvotes: 1

Related Questions