This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: [Q] Matlab MEX with gnu-win32
- To: gnu-win32 at cygnus dot com
- Subject: Re: [Q] Matlab MEX with gnu-win32
- From: "P.J. Walmsley" <pjw42 at cam dot ac dot uk>
- Date: Wed, 18 Jun 1997 09:52:24 +0100 (BST)
On Tue, 17 Jun 1997, Christian Joensson FOA 72 wrote:
> I'd like to know if someone has been able to build Matlab MEX files for
> Matlab 5.x using the gnu-win32 tools under either Sin '95 or NT 4.0?
I've not tried building mex files but I've linked in the matlab/mex
libraries to my own C++ programs. The makefile goes something like this:
MATLABVER=5
MATLABDIR=/mnt/nt_apps/matlab${MATLABVER}
MATLABINC=$(MATLABDIR)/extern/include
MATLABLIBDIR=$(MATLABDIR)/bin
MATLABLIBS=-lmat
matlablibs:
@cp $(MATDIR)/bin/LIB*.DLL .
@grep -v LIBRARY $(MATDIR)/extern/include/LIBMAT.DEF > libmat2.def
@grep -v LIBRARY $(MATDIR)/extern/include/LIBENG.DEF > libeng2.def
@grep -v LIBRARY $(MATDIR)/extern/include/LIBMX.DEF > libmx2.def
@echo "******************** converting dlls *************************"
dlltool --dllname libmat.dll --def libmat2.def --output-lib libmat.a
dlltool --dllname libmx.dll --def libmx2.def --output-lib libmx.a
dlltool --dllname libeng.dll --def libeng2.def --output-lib libeng.a
dlltool --dllname libut.dll --output-lib libut.a
-rm LIB*.DLL lib*2.def LIB*2.DEF
@echo "******************** installing *************************"
-mv libmat.a libmx.a libeng.a libut.a ../lib
------
typing 'make matlablibs' converts the dlls into import libraries that can
be linked against. I would imagine that to compile mex files you would
need to hack around with the cmex.bat script to do something similar to this.
Paul Walmsley
------------------------------------------------------------------------
Signal Processing and Communications Laboratory 01223 330247
Cambridge University Engineering Department
pwalmsley@iee.org pjw42@cam.ac.uk http://www2.eng.cam.ac.uk/~pjw42
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".