4

私はWindowsマシンで作業していて、curbプラグインを機能させようとしています.最初に気付いたのは、自分のマシンにcurlライブラリをインストールする必要があるということでした.

curl ライブラリ、curllib ライブラリをダウンロードして、それぞれ c:/curl と c:/curllib に配置しました。環境変数をセットアップし、curl.exe を実行できます。これは美しいように機能します。ただし、私の宝石はまだ次のように失敗します。

    C:/InstantRails/ruby/bin/ruby.exe extconf.rb install curb
checking for curl-config... no
checking for main() in curl.lib... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/InstantRails/ruby/bin/ruby
        --with-curl-dir
        --with-curl-include
        --without-curl-include=${curl-dir}/include
        --with-curl-lib
        --without-curl-lib=${curl-dir}/lib
        --with-curllib
        --without-curllib
extconf.rb:9:   Can't find libcurl or curl/curl.h (RuntimeError)

  Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
  options to extconf.


Gem files will remain installed in C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0 for inspection.
Results logged to C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/curb-0.4.4.0/ext/gem_make.out

誰にもアイデアはありますか?

4

1 に答える 1

2

これは、仕事を成し遂げるための最良のチュートリアルになります。

http://www.opiumtrail.com/wiki/CurbForWindows/

注意事項:

  • 私は MSVC6 を使用してコンパイルしたため、別のバージョンを使用するために彼が説明した追加の手順は適用されませんでした。
  • 彼のチュートリアルで指定された正確な宝石とlibcurlを使用する必要がありました
  • おそらく、付属の HTTP:NET ライブラリを使用して必要なことを達成できますが、私の場合、そのライブラリを使用してそれを理解できませんでした。
于 2009-07-21T17:48:37.303 に答える