This is the mail archive of the mailing list for the Guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dynamic linking fails

On Thu, Feb 03, 2000 at 11:34:35AM +0100, Bernard URBAN wrote:
> Dynamic linking works fine:
> $ hob -c test.scm
> [...]
> $ guile
> ;;; Be sure that the module '(hobbit4d link)' 
> ;;; can be accessed from guile
> ;;; by appending to %load-path in .guile, e.g.:
> ;;; (set! %load-path (cons "/export/home/urban/share/guile-hobbit"
> ;;;                       %load-path))
> ;;; (assert-repl-verbosity #t)
> ;;; (assert-load-verbosity #t)
> guile> (use-modules (hobbit4d link))
> ;;; loading /export/home/urban/share/guile-hobbit/hobbit4d/link.scm
> ;;; 10  msec  (0 msec in gc)
> guile> (hobbit-load-from-path "test")
> ;;; dynamic loading ././.libs/
> Hello, world.
> ;;; 20  msec  (0 msec in gc)
> guile>

Well, it doesn't work for me. After doing (hobbit-load-from-path "hello"),
I get:

/usr/local/share/guile-hobbit/hobbit4d/link.scm:72:15: In procedure apply in expression (dynamic-call (string-append "scm_init_" #) dynid):
/usr/local/share/guile-hobbit/hobbit4d/link.scm:72:15: Wrong type argument in position 1: %S
ABORT: (wrong-type-arg)

This is not a hobbit problem per se... I tried just doing:

(define d (dynamic-link "./"))
(define f (dynamic-func "scm_init_hello" d))
(dynamic-call f d)

and after entering the third line it emits the same "Wrong type" error. Is
this fixed in the cvs version or something?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]