fimad / scalpel

A high level web scraping library for Haskell.
Apache License 2.0
323 stars 43 forks source link

Can this be built on Windows 10? #55

Closed atcol closed 7 years ago

atcol commented 7 years ago

This API looks really promising. Nice work!

I'm using stack to build but get this error:

Configuring curl-1.3.8...
Building curl-1.3.8...
Preprocessing library curl-1.3.8...
[1 of 8] Compiling Network.Curl.Debug ( Network\Curl\Debug.hs, .stack-work\dist\b7fec021\build\Network\Curl\Debug.o )
[2 of 8] Compiling Network.Curl.Code ( Network\Curl\Code.hs, .stack-work\dist\b7fec021\build\Network\Curl\Code.o )
[3 of 8] Compiling Network.Curl.Types ( Network\Curl\Types.hs, .stack-work\dist\b7fec021\build\Network\Curl\Types.o )
[4 of 8] Compiling Network.Curl.Info ( Network\Curl\Info.hs, .stack-work\dist\b7fec021\build\Network\Curl\Info.o )
[5 of 8] Compiling Network.Curl.Post ( Network\Curl\Post.hs, .stack-work\dist\b7fec021\build\Network\Curl\Post.o )
[6 of 8] Compiling Network.Curl.Opts ( Network\Curl\Opts.hs, .stack-work\dist\b7fec021\build\Network\Curl\Opts.o )
[7 of 8] Compiling Network.Curl.Easy ( Network\Curl\Easy.hs, .stack-work\dist\b7fec021\build\Network\Curl\Easy.o )

D:\atc\AppData\Local\Temp\stack8212\curl-1.3.8\Network\Curl\Easy.hs:27:1: warning: [-Wtabs]
    Tab character found here, and in two further locations.
    Please use spaces instead.
[8 of 8] Compiling Network.Curl     ( Network\Curl.hs, .stack-work\dist\b7fec021\build\Network\Curl.o )

D:\atc\AppData\Local\Temp\stack8212\curl-1.3.8\Network\Curl.hs:278:1: warning: [-Wtabs]
    Tab character found here, and in 8 further locations.
    Please use spaces instead.

D:\atc\AppData\Local\Temp\stack8212\curl-1.3.8\curlc.c:10:23: error:
     fatal error: curl/curl.h: No such file or directory
compilation terminated.
`gcc.exe' failed in phase `C Compiler'. (Exit code: 1)

I have this set in my stack.yaml: extra-lib-dirs: ["C:/Program Files/cURL/dlls"]

But that obviously doesn't help.

Any ideas please?

igrep commented 7 years ago

I recently successfully built the curl package on Windows 7. I guess you need to specify both extra-lib-dirs and extra-include-dirs. extra-lib-dirs is for the DLL file, and extra-include-dirs is for the header file namely.

atcol commented 7 years ago

Awesome! That did it. Thanks. Sorry for the noob question :)

I placed these settings in my stack.yaml:

extra-lib-dirs: ["C:/Program Files/cURL/dlls"]
extra-include-dirs: ["C:/Program Files/cURL/dlls"]

and ensured the include/curl directory from the source archive was in the extra-include-dirs directory, and it built!