
On Fri, 15 Jun 2012 07:53:32 +0200, Song Zhang
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