This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
dynamic linking fails
- To: guile at sourceware dot cygnus dot com
- Subject: dynamic linking fails
- From: "C. Ray C." <crayc at 206 dot 31 dot 63 dot 15>
- Date: Thu, 3 Feb 2000 15:16:13 -0600
- References: <Pine.LNX.4.00.10002022148280.8673-100000@kiwi.pyro.net> <yg190127ex0.fsf@min.meteo.fr>
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/libtest.so.0.0.0
> 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 "./libhello.so"))
(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?