D
derek.hans
I'm trying to get support for Berkely DB under windows, but I have not
been able to produce a functional build of the BDB library.
Compiling with Visual Studio produces a dll, however ruby complains
that it can't find the "Init_bdb" method when trying to use the dll.
The Init_bdb function deffinitly exists in the source code.
Compiling under linux produces working linux binaries; however, when I
tried cross-compiling using mingw (as described in
http://eigenclass.org/hiki.rb?cross+compiling+rcovrt), I wasn't able to
successfully link against the berkeley db dll.
Furthermore, I tried using the berkeley db dll directly using Ruby/DL,
again with no success. Code in this style:
require 'dl/import'
module BDB
extend DL::Importable
dlload "libdb44.dll"
extern "int db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags)"
end
fails because db_create cannot be found, while something like this:
require 'dl'
bdb = DL.dlopen('libdb44.dll')
db_create = bdb['db_create', 'IPPI']
db = nil
db_create.call(db, nil, 0)
fails because the dll somehow makes ruby "exit unexpectedly" during
db_create.call.
I've run out of ideas how to make it work. Has anyone been successful?
been able to produce a functional build of the BDB library.
Compiling with Visual Studio produces a dll, however ruby complains
that it can't find the "Init_bdb" method when trying to use the dll.
The Init_bdb function deffinitly exists in the source code.
Compiling under linux produces working linux binaries; however, when I
tried cross-compiling using mingw (as described in
http://eigenclass.org/hiki.rb?cross+compiling+rcovrt), I wasn't able to
successfully link against the berkeley db dll.
Furthermore, I tried using the berkeley db dll directly using Ruby/DL,
again with no success. Code in this style:
require 'dl/import'
module BDB
extend DL::Importable
dlload "libdb44.dll"
extern "int db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags)"
end
fails because db_create cannot be found, while something like this:
require 'dl'
bdb = DL.dlopen('libdb44.dll')
db_create = bdb['db_create', 'IPPI']
db = nil
db_create.call(db, nil, 0)
fails because the dll somehow makes ruby "exit unexpectedly" during
db_create.call.
I've run out of ideas how to make it work. Has anyone been successful?