jaeandersson / swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
http://www.swig.org
Other
23 stars 19 forks source link

Make SWIG-MATLAB work for Octave #67

Closed jaeandersson closed 8 years ago

jaeandersson commented 8 years ago

Octave has support for most of the features used by the MATLAB SWIG module: mex, classdef etc. It should (in principle at least) be possible to make the generated SWIG-MATLAB modules compilable for both Octave and MATLAB. This would be an attractive alternative to using SWIG's Octave module in many cases.

Issues encountered:

jaeandersson commented 8 years ago

Pushed to the "matlab" branch. Note that this adds one MATLAB file: SwigGet.m. You'd need to distribute this file for the updated module to work. But then it should work for both MATLAB and Octave.

jaeandersson commented 8 years ago

Alerted octave devs about the fact that mkoctfile doesn't recognize ".cxx" suffix: https://savannah.gnu.org/bugs/index.php?48381. Can't do much more than that.

jaeandersson commented 8 years ago

Octave issue fixed: ".cxx" will be recognized by mkoctfile in Octave 4.2.

jaeandersson commented 8 years ago

Build system now bilingual: Set the "--enable-octave-for-matab" configure option to use Octave instead of MATLAB for the testing (the generated code code is always bilingual). One unit test fails for Octave: #69.