[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interface for C libs in Octave
From: |
fork |
Subject: |
Re: Interface for C libs in Octave |
Date: |
Mon, 21 Jun 2010 22:42:46 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
TOT <anaryusifov <at> gmail.com> writes:
>
>
> Dear all,
>
> Short question: How to get access to C library (have both: static and shared
> with -fPIC) from Octave? I need to pass some values to some functions and
> get the results. Is there any HowTo or Example of it?
If you want to call c (with libraries to handle matrices and the like) functions
from an octave script, there are a couple of well established ways. I have
never used them, but Octave comes with "oct" and "mex" extension frameworks, for
C++ and C respectively. The latter corresponds to matlab's mex approach.
http://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Oct_002dFiles.html
http://www.gnu.org/software/octave/doc/interpreter/Mex_002dFiles.html
If you want to call octave from C code that is handling input and output, some
folks have worked on that, but I think it might be just as easy to use LAPACK or
some other library from within your (already written) program.
>From your post, I am not sure which approach you are hoping to take.
Good luck!