2012年3月27日 星期二

How to install HDBC-sqlite3 on windows.


I downloaded sqlite3.dll and sqlite3.h from source zip.
then I inserted sqlite3.dll in system32 dir and in setup configure i used
--extra-lib-dirs=... --extra-include-dirs=... parameters with correct paths to header and dll.


You have a problem it seems. You want to install the Haskell HDBC-sqlite3 library on Windows but you seem to be getting these error messages telling you that it cannot find the required sqlite3 library. The way that you solve this kind of problem is by simply getting your hands on the sqlite3.dll and sqlite3.h files, from here, and putting them in locations that you can then add to the cabal install command later. The ultimate install command should look really simple, something like this:
cabal install HDBC-sqlite3 \
--extra-lib-dirs='C:\some\path\to\sqlite\lib' \
--extra-include-dirs='C:\some\path\to\sqlite\include'
Where you obviously need to set what actual paths get given to those variables.
The only other gotcha that you will need to look out for it to make sure that the sqlite3.dll is always in the path of any program that you make that depends on HDBC-sqlite3 because otherwise it will complain about not being able to find the required dll. Just so that you know, the current directory of any program is always in the current library path.

沒有留言:

張貼留言