Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  the "download" package fail to install (Henk-Jan van Tuyl)


----------------------------------------------------------------------

Message: 1
Date: Fri, 15 Jun 2012 23:30:32 +0200
From: "Henk-Jan van Tuyl" <hjgt...@chello.nl>
Subject: Re: [Haskell-beginners] the "download" package fail to
        install
To: beginners@haskell.org, "Song Zhang" <vxan...@gmail.com>
Message-ID: <op.wfyrc6anpz0...@zen5.arnhem.chello.nl>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
        delsp=yes

On Fri, 15 Jun 2012 07:53:32 +0200, Song Zhang <vxan...@gmail.com> wrote:

> Hi
> There is a package for High-level file download based on URLs called
> "download", but failed to build on windows, If you don't know it, you can
> refer to hackage first. I compiled in C, but did not get useful massage,
> anyone can help me a little to fix that.
> cabal install download
> get a bad header file

If you give the following command, you have the source code on disk
   cabal unpack download

Try to install, with debug messages:
   cd download-0.3.2
   cabal install -v3

Near the end, you will see:
   cbits/download.h:49:15: error: 'MAXHOSTNAMELEN' undeclared here (not in a
   function)

cbits/download.h uses the macro MAXHOSTNAMELEN; on a Windows system, this
is defined in a different header file,

A simple solution is inserting the following lines after line 44 in  
download.h:
   #ifdef _WIN32
   #define MAXHOSTNAMELEN 256
   #endif

This results in a complaint about macro FILE not being defined; this can  
be solved by adding line:
   #include <stddef.h>

The error message now is:
   In file included from C:\DOCUME~1\Henk-Jan\LOCALS~1\Temp\1848.c:1:0:
   cbits/download.h:98:1: error: expected '=', ',', ';', 'asm' or  
'__attribute__'
   before 'FILE'

I hope someone else will solve this last(?) problem.

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--



------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 48, Issue 20
*****************************************

Reply via email to