[Top][All Lists]

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

Re: New User and how to use octave in c code ?

From: Mike Miller
Subject: Re: New User and how to use octave in c code ?
Date: Wed, 26 Apr 2017 10:34:49 -0700
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Apr 26, 2017 at 09:51:56 -0700, Progressive wrote:
> sorry, it was a confusion. I'm still busy with setting up octave but I'm
> indeed lost at the moment.
> I'm not sure where to start: From my point of view I have already a code and
> would like to implement octave functions in there.
> Many sources tell that it is better to create m-files, other say octave
> should be used as a standalone makefile, according to " mkoctfile
> --link-stand-alone -o standalone " which does not compile,
> too.

We can start there. You should be able to build the example standalone
program provided with the Octave source.

    $ curl -sO
    $ mkoctfile --link-stand-alone -o standalone
    $ ./standalone 
    Hello Octave world!
     11 12
     21 22

That should work out of the box. Does it not work for you? What part
fails and what error messages do you get?

> I'm really having problems to find a start though I didn't do anything else
> the last 24h. 
> I assume I would gain a lot by knowing which way I shall pursue. As I
> mentioned I already have a code so I thought I just have to include the
> octave header but obviously this does not work. So either I solve this
> (somehow) or, as adviced somehwere, I write a m-file and then I have to
> figure out how to adjust my makefile for octave. At the moment I'm somewhere
> in between. And I tried a lot of different stuff meanwhile.

It would help if you explained more specifically what you are trying to
do with Octave. Octave can be used in many different ways, it's not
clear to me whether you are trying to use Octave's numerical library,
embed the full interpreter in another program, write a function to call
from Octave, or something else.

If your code is hosted somewhere publicly, providing a pointer to that
would help other help you a great deal.


reply via email to

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