[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic linking with g++
From: |
Thomas Wawrzinek |
Subject: |
Re: dynamic linking with g++ |
Date: |
Tue, 19 Jun 2001 08:37:47 +0200 (MEST) |
Hi!
> guile> (use-modules (math bessel))
> ERROR: In procedure dynamic-func:
> ERROR: undefined symbol: scm_init_math_bessel_module
That's probably because of the C++ compiler generating mangled symbols.
In your C++ source (bessel.cxx or whatever) you need to say:
extern "C"
void scm_init_math_bessel_module ()
{
scm_register_module_xxx ("math bessel", init_math_bessel);
}
the `extern "C"' instructs the compiler to generate a C binding symbol.
Than the (dynamic-func ...) call should find the function in the library.
HTH,
Thomas