help-octave
[Top][All Lists]
Advanced

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

Re: Octave standalone exe and graphics toolkit


From: Michael Goffioul
Subject: Re: Octave standalone exe and graphics toolkit
Date: Fri, 22 Mar 2013 22:41:38 -0400

On Fri, Mar 22, 2013 at 10:14 PM, Jordi Gutiérrez Hermoso <address@hidden> wrote:
On 22 March 2013 21:40, vinukn <address@hidden> wrote:
> I have create a stand alone exe. I used eval_string fuction. eval_string("3
> 3",...) gives correct output. When i tried to plot some plot
> (eval_string("plot(magic(4))",...)), I got an error:'unable to set default
> graphics backend'.

Can you please ask address@hidden? This list is for development of
Octave itself.

[moving to address@hidden]

The problem is that there's no global QApplication object, which is required to run any Qt UI like the one in QtHandles. When you run octave normally, you're actually running a modified executable (octave-qt.exe, part of QtHandles) that is installed as octave.exe. This modified executable provides the QApplication object in order to run QtHandles.

However when creating a standalone exe with mkoctfile, octave creates a standard executable, without the global QApplication object. Hence QtHandles cannot  be loaded properly.

Unfortunately, there's no easy/trivial solution for that problem. Somehow you have to provide the QApplication object, as QtHandles doesn't do it for you. Maybe one solution is to hack the octave-generated main() code to add the missing pieces and compile the resulting file manually. But I'm not sure you can tell mkoctfile to leave intermediate files in place.

Michael.


reply via email to

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