guile-user
[Top][All Lists]
Advanced

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

Re: concerns when integrating C++ code into guile?


From: Hans Aberg
Subject: Re: concerns when integrating C++ code into guile?
Date: Thu, 8 Jan 2015 10:54:38 +0100

> On 8 Jan 2015, at 02:00, Matt Wette <address@hidden> wrote:
> 
> 
> On Jan 7, 2015, at 6:45 AM, Hans Aberg <address@hidden> wrote:
> 
>> 
>>> On 7 Jan 2015, at 14:52, Matt Wette <address@hidden> wrote:
>>> 
>>> Python is written in C yet Qt has been integrated in to produce PyQt.   I 
>>> wonder how that is done.  I will take a look.
>> 
>> If Python can be compiled as C++, that might be one way.
> 
> PyQt does not recompile Python in C++ so there must be some way to do it w/o 
> recompiling python (=> guile).
> 
> TeXmacs is another application that embeds C++  (Qt) w/ guile (1.8, though).

You can pass C++ objects to C code, cf. [1], but longjmp() is incompatible with 
C++ exceptions. So before passing the C++ object, convert it to POD (plain old 
data) and catch any exceptions.

1. https://isocpp.org/wiki/faq/mixing-c-and-cpp





reply via email to

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