Using Curl in the Haskell Platform on Windows 7

I am trying to use "import Text.XML.HXT.Curl" in my project so that I have access to online files (some XML files).

So, I get the message:

Could not find module `Text.XML.HXT.Curl': Use -v to see a list of the files searched for. 

I tried:

 :! cabal install curl 

but I get an error that should be on unix or cygwin, so I continue installing cygwin, now it says:

 checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. cabal: Error: some packages failed to install: curl-1.3.7 failed during the configure step. The exception was: ExitFailure 77 :! gcc -version Access is denied 

I tried to download the curl package and install it using cmd: runHaskell Setup.hs configure, but I get the following:

 Setup.hs: Missing dependency on a foreign library: Missing C library: curl This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version) 

I tried installing gcc, g ++, libcurl, make in cygwin, it still fails.

I tried installing mingw / mysis, and I was wrong too. Something about the whirlwind /curl.h is missing.

Has anyone succeeded and can tell me how he did it?

+4
source share
1 answer

Installing curl on windows can be a daunting task. But you can try the hxt-http package. It is based on the native HTTP package and does not require external dependencies. AFAIK it will just work from window to windows.

A hxt note: to use curl with hxt you need to install the hxt-curl package. But, yes, this will not help, because it depends on the curl package curl

So, my answer is actually about "using hxt on windows," not about "using curl on windows." You can ignore it if this does not help you.

+2
source

Source: https://habr.com/ru/post/1413762/


All Articles