[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile-db

From: Clinton Ebadi
Subject: Re: guile-db
Date: Mon, 20 Oct 2008 14:15:21 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Sebastian Tennant <address@hidden> writes:

> Quoth Greg Troxel <address@hidden>:
>>   but...
>>   "To build Guile-PG you need to have installed both the PostgreSQL
>>    frontend library libpq, and a version of Guile that can load binary
>>    module (a b c) from file a/b/ or a/b/c/ under `%load-path'."
>>   I believe the last bit means it'll work with guile-1.4 or guile-1.6
>>   (because the ability was only deprecated at this stage), but guile-1.8
>>   definitely no longer has this ability.
>> True, but to make this work in 1.8 you just have to write a single .scm
>> file for the module which loads the shlib and re-exports all the right
>> symbols.  And maybe a little else, but I am pretty sure not much.
> Easy for a C programmer no doubt, but not so easy for a lowly scripter
> like myself.

  (define-module (pg whatever)
    #:export (guile-pg symbols ...))
  (load-extension "libwhateverpg" "guile_pg_init")

Is roughly what you need. Assuming that there is an init function in
guile-pg that creates all of bindings for the library which, if I am
remembering how the autoloading magic works, it has to. This is
definitely something that anyone could do (just find the guile-pg init
function and export every scm_define_gsubr etc.).
Lindsay (Carlton): nighttime baker! sounds a little iffy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]