[Top][All Lists]

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

Re: Use package in standalone programs

From: Zoltán Szabó
Subject: Re: Use package in standalone programs
Date: Mon, 8 Jan 2018 14:39:23 +0000

Thank you, I will check this out soon.

Is it possible to use an other compiler like gcc and configure it just like what mkoctfile does? Because I might use gcc as my project requests it.

On Mon, Jan 8, 2018 at 1:28 PM, siko1056 <address@hidden> wrote:
Zoltán Szabó wrote
> I am trying to create a small c++ application to execute an octave m file.
> So this will be a standalone program as mentioned here:
> My m file is using some functions from the signal package. Is it possible
> to load a package from a standalone program when using octave as a
> library?
> Thanks

For the current Octave development version 4.3.0+ it is possible. Do you
need version 4.0.3 or the current stable version 4.2.1? There it seems to
make some trouble.

Using the current Octave development version 4.3.0+ and the interval package
as example:

pkg load interval
infsup (1, 2)
   ans = [1, 2]

Extending [1] as a start, the above would translate to:

octave::feval ("pkg", ovl ("load", "interval"), 0);
octave_value_list out = octave::feval ("infsup", ovl (1, 2), 1);

if (out.length () > 0)
  octave::feval ("disp", out(0), 0);

Compiled with:

mkoctfile --link-stand-alone -o embedded



Sent from:

Help-octave mailing list

reply via email to

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