How do I link an installed C library to Octave to create new, Octave callable functions?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I link an installed C library to Octave to create new, Octave callable functions?

babelproofreader
The installed library is  ta-lib <https://sourceforge.net/projects/ta-lib/>  
which, on my Linux system, consists of five header files in the directory
/usr/include/ta-lib. Over on the  MATLAB fileexchange
<https://www.mathworks.com/matlabcentral/fileexchange/34744-ta-lib-mex-functions-and-oslion-binaries#functions_tab>  
a user has provided a compileMex.m script to link/compile, with a typical
line such as

mex TA_ADOSC.c -I"../src/TA_COMMON/" -I"../include/" -L"../src/.libs/"
-l"ta_lib"

Basically my question is "What is the equivalent Octave 'mkoctfile' command
for the above MATLAB mex command?"




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: How do I link an installed C library to Octave to create new, Octave callable functions?

siko1056
On 8/6/20 12:07 AM, babelproofreader wrote:

> The installed library is  ta-lib <https://sourceforge.net/projects/ta-lib/>  
> which, on my Linux system, consists of five header files in the directory
> /usr/include/ta-lib. Over on the  MATLAB fileexchange
> <https://www.mathworks.com/matlabcentral/fileexchange/34744-ta-lib-mex-functions-and-oslion-binaries#functions_tab>  
> a user has provided a compileMex.m script to link/compile, with a typical
> line such as
>
> mex TA_ADOSC.c -I"../src/TA_COMMON/" -I"../include/" -L"../src/.libs/"
> -l"ta_lib"
>
> Basically my question is "What is the equivalent Octave 'mkoctfile' command
> for the above MATLAB mex command?"
>

Octave has a "mex" wrapper script for "mkoctfile" [1].  Basically you do
not have to care about just executing his code.  Please keep in mind,
that you are violating MATLAB's File Exchange Terms of Use by using
Octave [2].

HTH,
Kai

[1] https://www.octave.org/doc/v5.2.0/XREFmex.html
[2]
https://wiki.octave.org/FAQ#Why_can.27t_I_use_code_from_File_Exchange_in_Octave.3F