From: Jerry <lanceboyle@qwest.net>
Subject: Re: Help linking to Octave (mathematical) functions
Date: Mon, 29 Dec 2014 19:24:53 -0800 (PST)
Date: 2014-12-29T19:24:53-08:00 [thread overview]
Message-ID: <cd4e31e6-ecbc-4acc-94ee-fcbe004ff0c3@googlegroups.com> (raw)
In-Reply-To: <85ioguu7zw.fsf@stephe-leake.org>
On Monday, December 29, 2014 2:21:09 AM UTC-7, Stephen Leake wrote:
> Jerry writes:
>
> >> Despite the documentation said it is like "shared library or shared
> >> object", it is referring to Octave itself "An oct-file is a dynamical
> >> extension of the Octave interpreter".
> >> On MacOS, even with GNAT, at the end, all object files are loaded by ld
> >> but I haven't seen that oct files are supported by ld.
> >
> > That's not good. I wonder if the internal structure of an oct file is
> > similar to other files known by ld. I suppose this is a question for
> > the Octave developer list.
>
> Yes. Or a Mac list; the problem seems to be with the "bundle" stuff.
Yes. I hope to get back to this soon, one way or another.
>
> Can you try this on a Linux distribution?
Not easily. I don't have Linux installed on my Mac. But I see what you're getting at--the bundle stuff might be a Mac anomaly; I've seen MH_BUNDLE discussed on other lists but mostly it goes over my head.
>
>
> Since this is all open source, you could try compiling the bessel
> library from source using GNAT, and either creating a more standard
> library or just include it in your main project.
I hadn't thought of that. Seems reasonable and obvious now that you mention it. OTOH the Numerical Recipes book has a very quick solution based on Abramowitz & Stegun.
>
>
> Another option is to link the Octave interpreter to the Ada program, and
> then tell it to load the oct-file.
>
> There may be an Octave library that lets you do this, hopefully with an
> Ada binding available.
Not sure how that would proceed. But for an earlier case where I needed a bit of Octave in an Ada program I did a hilariously crude thing: I had the Ada program write out the Octave source script to a text file then called Octave with pragma Import(C, system) (not sure why I didn't use GNAT.OS_Lib.Spawn), had Octave write out the answer to a new text file, and read that text file with the Ada program. A tad slow I would surmise but I then needed only one call to Octave.
Jerry
>
> --
> -- Stephe
prev parent reply other threads:[~2014-12-30 3:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 21:31 Help linking to Octave (mathematical) functions Jerry
2014-12-26 11:54 ` Blady
2014-12-28 3:38 ` Jerry
2014-12-29 9:21 ` Stephen Leake
2014-12-30 3:24 ` Jerry [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox