4

プロジェクトで 'import Text.XML.HXT.Curl' を使用して、オンライン ファイル (いくつかの xml ファイル) にアクセスできるようにしようとしています。

だから私が得るエラーは次のとおりです。

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

私は試した :

:! cabal install curl 

しかし、それは unix または cygwin 上になければならないというエラーが表示されるので、cygwin のインストールを続行すると、次のように表示されます。

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

curlパッケージをダウンロードしてcmdでインストールしようとしました:runHaskell Setup.hs configureしかし、私はこれを取得します:

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)

gcc、g++、libcurl、make を cygwin にインストールしようとしましたが、まだ失敗します。

mingw/mysis をインストールしようとしましたが、私も失敗しました。curl/curl.h に関する何かがありません。

成功した人はいますか?

4

1 に答える 1

2

Windows へのインストールcurlは難しい場合があります。ただし、 hxt-httpパッケージを試すことができます。ネイティブ パッケージに基づいておりHTTP、外部依存関係は必要ありません。私の知る限り、Windowsではそのまま使用できます。

小さな注意: で使用するcurlには、 hxt-curlパッケージhxtをインストールする必要があります。しかし、はい、パッケージに依存するため、役に立ちません:(curl

したがって、私の答えは、実際には「windows で curl を使用する」ということではなく、「windows で hxt を使用する」ということです。役に立たない場合は無視してかまいません。

于 2012-05-22T17:27:32.827 に答える