guile-user
[Top][All Lists]
Advanced

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

Re: Accessing C/C++ structs in Guile.


From: Martin Grabmueller
Subject: Re: Accessing C/C++ structs in Guile.
Date: Thu, 15 Mar 2001 08:37:18 +0100

> From: Brett Viren <address@hidden>
> Date: Wed, 14 Mar 2001 15:41:23 -0500 (EST)
> 
> I have some data which is a C/C++ integer array that gets overlayed
> onto a C/C++ struct (which has sub-structs) and I want to access this
> struct in Guile (using Guile as an extension language in C/C++
> ``master world'' app) in a way that preserves the structure.  Every
> second or so, I want to update the Guile copy of the struct from the
> C/C++ copy.

I don't know what your application is doing, but wouldn't it be
simpler (and better, performance-wise) to define a few primitives
which mangle the C++ data and can be called by Guile code?

> 2) Is there some automated way that will take the header file holding
> the C/C++ structure definition and generate necessary Guile code?

Have you looked at the interface generator SWIG yet?  I haven't used
it either and don't have an URL handy, but maybe it will help you.

Regards,
  'martin



reply via email to

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