Closed agitter closed 5 years ago
In the end, I did not use the MEX API, but directly the Octave C++ API. Here is the wrapper: https://github.com/Alexander-Barth/octave-optiminterp/blob/master/src/optiminterp.cc
Maybe now it is better to use the Fortran ISO C-bindings. With such bindings the Fortran code can be called from the MEX C API (or from any other programming language able to call C functions).
@Alexander-Barth thank you very much for your suggestions and code example.
I had this problem too, and stumbled across this discussion, sorry if this is the wrong place but you may be the only other two people in the world who ever cared ... here's my solution: generate a wrapper from the mexproto.h file: https://gitlab.com/snippets/1858512 might not be perfect, it's better than nothing.
Thanks for finding this issue @tesch1 and sharing your progress. I am very interested in your solution and will explore what you worked out in https://gitlab.com/snippets/1858512 and https://gitlab.com/tesch1/mkoctfort.
@Alexander-Barth well over a decade ago, you wrote to the octave-maintainers list about interfacing Fortran and Octave with the mex API. I'm now facing a similar issue while attempting to port a MATLAB program to Octave on this project. Octave does not support a Fortran mex interface, so I'm curious whether you ever pursued this further. Thanks.