help-octave
[Top][All Lists]
Advanced

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

embedding octave twice causes warning: duplicate binary operator


From: John W. Eaton
Subject: embedding octave twice causes warning: duplicate binary operator
Date: Wed, 4 Mar 2009 12:40:39 -0500

On  4-Mar-2009, Soeren Sonnenburg wrote:

| I've embedded octave following the embed example on the wiki (that
| successfully resulted in a run octave code from R or python and vice
| versa).
| 
| Running the code
| 
| octave_main(argc,argv,1);
| <code>
| do_octave_atexit();
| 
| multiple times gives me many warnings like
| 
| warning: duplicate binary operator `>' for types `uint32 scalar' and `uint32 
scalar'
| warning: duplicate binary operator `!=' for types `uint32 scalar' and `uint32 
scalar'
| warning: duplicate binary operator `<' for types `uint32 scalar' and `uint32 
scalar'
| warning: duplicate binary operator `<=' for types `uint32 scalar' and `uint32 
scalar'
| 
| So I am now wondering how to properly cleanup octave such that they
| don't occur.

The do_octave_atexit function doesn't uninitialize Octave.  It just
runs the list of functions that have been registered with "atexit".

I don't think there is a way to unregister operators (Octave itself
doesn''t need functionality like that).

I would suggest only embedding and initializing it once in your
application.  If you need to do something different, then you'll need
to do some work to implement functions that properly shutdown and
cleanup the Octave interpreter so that it may be initialized again.
But since Octave is not reentrant/thread safe, even if you do that,
you will likely only be able to initialize one copy of Octave at a
time.

| Ahh and how would it be possible to muten octave when it is running
| embedded (not print the copyright notice all the time?)

Pass "-q" in argv?

jwe


reply via email to

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