Something like that
embed.cpp
#include <iostream> #include <octave/octave.h> int main(int argc,char* argv) { int embedded; octave_main(argc,argv,embedded=0); return embedded; }
Then
mkoctfile embed.cpp --link-stand-alone -o embed to make a standalone executable.
To call octave functions, regardless of whether they are provided by scripts or octave modules, you can use feval, which takes the name of the octave function as a string, octave_value_list of input variables for this function, and the number of variables for this function as an integer.
See here for more details.
Appleman1234
source share