[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fortran mex interface shim generator

From: Michael Tesch
Subject: fortran mex interface shim generator
Date: Wed, 22 May 2019 18:18:28 +0200


I wrote a little script to generate fortran (77) wrappers around the octfile (mex) functions.  Just wanted to share what I've got so far, hopefully it will help someone.  Maybe someone would like to contribute modern fortran module support.

it's here:

It just takes the mexproto.h and munges it up a bit and spits out a corresponding which wraps the functions defined therein, and can be linked against a .F.  I'm sure there's a better way of doing this, but this is a pretty flexible approach and can be adjusted to suit whatever fortran compiler you're targeting and its abi.)

Obviously it only covers the mex functions callable from fortran - f77 dont do no varargs.  Also no constants are provided, it's really just a WIP that does maybe 80% of what it should.

I tried it on the recently mentioned Glmnet ( and it seems to work ok.

(related to messages:,,

It seems to be a rarely-requested item, but I'd be fine with it if someone wanted to clean it up and include it in octave proper.


ps. thank you all for all your work on octave!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]