How to build Matlab 5 MEX files with the GNU-Win32 tools

Ton van Overbeek tvoverbe@wk.estec.esa.nl
Tue Jul 8 04:09:00 GMT 1997


I finally succeeded to build 32-bit MEX files for Matlab 5 using
the free GNU Win32 tools ( http://www.cygnus.com/misc/gnu-win32 ).

The main problem was that the linker in the b18 release leaves
cruft in the unused parts of the various sections of the dll.
This seems to occur mostly on Win95. I do not have the problem
on our NT system (NT3.51 with Citrix WinFrame multi-user extension).
Digging in the gnu-win32 mailing-list archives I found various
references to the problem. The recently posted peclean.exe by
William Greathouse solves it. See
http://www.cygnus.com/ml/gnu-win32/1997-Jul/0047.html .
Attached is the script which (for me) successfully builds
the yprime example. See 'Getting Started' in the API Guide,
pp. 1-9 -- 1--10.

I am also working on a mexopts.bat and associated scripts so
you can build MEX files from within matlab.

Ton van Overbeek, tvoverbe@wk.estec.esa.nl


More information about the Cygwin mailing list