xmat_oct.cpp
was successfully used for this. In Linux, the following commands were used within GNU Octave for compilationmkoctfile -ffree-form -cpp -DOCTAVE_CALLING xmat.f -c;
delete *.mod;
mkoctfile -L/usr/lib64/octave/6.4.0 -o xmat_oct xmat.o xmat_oct.cpp;
Please note, that the path to the GNU Octave libraries (/usr/lib64/octave/6.4.0
) needs to be adjusted according to your installation. In general, for compilation the macro OCTAVE_CALLING
has be defined next to the flags for free format and preprocessing (as shown).Linked files