2013年1月23日水曜日

WindowsにHaskell HDBC-sqlite3のインストール

普通に
cabal install HDBC-sqlite3
を実行するだけじゃ、こんなエラーが出てきます。
setup: Missing dependency on a foreign library: * Missing C library: sqlite3 
This problem can usually be solved by installing the system package 
that provides this library (you may need the "-dev" version). 
If the library is already installed but in a non-standard location 
then you can use the flags --extra-include-dirs= and --extra-lib-dirs= 
to specify where it is.
問題の解決は
1.このサイトSQLiteから、
sqlite-dll-win32-x86-3071502.zip
をダウンロードして解凍してから、
中の.dllファイルを環境変数%PATH%中にあるDirectoryに入れる。
たとえば、system32とか・・・C:\Foo\とか

2.同じサイトから
sqlite-amalgamation-3071502.zip
をダウンロードして解凍してから、
中の.hファイルを同じフォルダに入れる。

3.再びコンソールでインストール

cabal install HDBC-sqlite3 \
--extra-lib-dirs="C:\Foo" --extra-include-dirs="C:\Foo"

0 件のコメント:

コメントを投稿