On Thu, 10 Mar 2016 23:48:43 +0530
Arun Isaac <theroarofthedra...@gmail.com> wrote:
> Hi,
> 
> Is there any foreign function interface for C++ shared libraries in
> Guile? Can I somehow use the C FFI for this? Is there any
> documentation for this?

If you want to link with a C++ library when using libguile (and, say,
want to make functions in the library accessible to scheme code using
scm_c_define_gsubr()), then you need to declare interface functions as
extern "C" so they have C language linkage.  That will amongst other
things suppress name mangling and make sure the correct calling
convention is used.  The same applies if you are planning to use, say,
pointer->procedure.

Chris

Reply via email to