[Top][All Lists]

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

Re: using octave from a C++ program

From: Paul Kienzle
Subject: Re: using octave from a C++ program
Date: Mon, 27 Oct 2003 09:57:58 -0500
User-agent: Mutt/


As well as the initialization code you included from octave.cc, you also
need to do the initialization and cleanup in top_level.cc.

Since I'm keen to see you succeed in this (I want to embed octave in Tcl
for example), I got your example to compile and run.  In addition to
init_octave, I've defined call_octave which prepares the interpreter
state, calls eval_string and returns.

There is a lot of work left to be done of course, but I hope this is enough
to get you started.  Please try to keep a C-compatible interface to
whatever octave features you need, with opaque pointers to octave's data
structures.  This will make it easier to embed in a variety of environments.

You do not want to maintain your own fork of top_level.cc and octave.cc!
Please submit patches which break up octave.cc and top_level.cc in such
a way that octave's read-eval-print loop is separate from the initialization
and evaluation code.

Paul Kienzle

On Fri, Oct 24, 2003 at 02:31:05PM -0800, Jonathan Hudson wrote:
> Oops- I forgot to attach the code.
> In regards to writing it as an octave script first,
> right now I wrote an expect script that
> lets me run octave commands from python.
> But exchanging the data between octave and python
> is slower then attaching octave directly as a module
> since I need to convert the text output each time
> a variable changes.
> -- 
> http://www.fastmail.fm - One of many happy users:
>   http://www.fastmail.fm/docs/quotes.html

Attachment: octave_embed.tar.gz
Description: application/tar-gz

reply via email to

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