Elephant Object Database now works on Win32
Thursday, October 7, 2004
I previously mentioned the Elephant object database project for CL when discussing the CL weblog tutorial that is available on the Elephant project page. At the time I posted, I mentioned that Elephant doesn't work with Win32. Well, Ben (one of the Elephant developers) sent me an email saying that Elephant should be able to work on Win32 and offered to help me get it working. After a few email exchanges, I am pleased to report that Elephant now works on Win32 too! Basically, you just follow the Elephant INSTALL file instructions with a few mods. These changes will soon make it into the Elephant distribution; however, for anyone who wants to try out Elephant on Win32 today, here are the changes that I had to do to get it going:
- Downloaded elephant 0.2, UFFI 1.4.26, and Sleepycat's Berkeley DB 4.2.52NC
- Since I downloaded UFFI 1.4.26, I didn't need to replace the functions.lisp file that is mentioned in the INSTALL file - the 1.4.26 version works fine
- Set the asdf:*central-registry* variable to include the locations of UFFI and Elephant
- Installed and built (with MS VC++ v6) Berkeley DB as per the standard MSVC Win32 instructions for Berkeley DB
- Built the libsleepycat.c file as a dll by doing the following:
- Downloaded the cvs version of libsleepycat.c and libsleepycat.def (dll definition file) from the Elephant CVS and put them in the Elephant src directory (Actually, Ben sent these to me by email but they should be in CVS by the time you read this)
- Created an MSVC dll project and added the libsleepycat.c, libsleepycat.def and the Berkeley DB libdb42.lib files to the project
- Added the Berkeley DB dbinc include files directory and the build_win32/release directory (where the Berkeley DB install instructions builds the Berkeley DB objects by default) to the build directories for the project
- Built the Elephant DLL file
- Modified the sleepycat.lisp file so that the uffi:load-foreign-library statements load the libdb42.dll and the Elephant dll from the correct locations
- From the REPL, ran (asdf:operate 'asdf:load-op :elephant) to build the CL portion of Elephant (Note: I used Franz Allegro CL 7beta)

