Dear Guile-users,
I am wondering what the best way is to connect Guile with C++ code. I
notice that several large programs use Guile in this way (TeXmacs and
LilyPond), so it seems that it is possible to do it, and it works well
enough that you can write a large, functioning program with it.
Howev
Dear Noah,
there are no inherent problems with mixing Guile, C, C++, guile (MS
windows, LINUX,GNUStep,X11)
Depends on how you order your includes, which OS you use, version conflicts
etc.
Using scoping rules to the fullest you can pretty much mix it up as you
like.
obj.
Thanks a lot.
How would this work if I wanted to not run Guile embedded in a C++
program, but instead load the C++ code at runtime from a regular Guile
interpreter? (This could use either the libffi binding or the regular
Guile ones.)
Thank you
Noah
On Fri, May 14, 2010 at 3:54 PM, objc wrote:
On 14 May 2010, at 22:05, Noah Lavine wrote:
How would this work if I wanted to not run Guile embedded in a C++
program, but instead load the C++ code at runtime from a regular Guile
interpreter? (This could use either the libffi binding or the regular
Guile ones.)
Since Guile is written in C,
OK, I have found a solution. The point is that in section 4.2.2 of R5RS it is
explicitly stated that mutually recursive defines must not refer to those
variables. The solution is thus to wrap the defines in (lambda () ...)s.
(define (solve f y0 dt)
(define (y) (integral (delay (dy)) y0 dt))