Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news.belwue.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail
From: Ralph Schleicher <rs+usenet@nunatak.allgaeu.org>
Newsgroups: comp.soft-sys.matlab
Subject: Re: mex linux source for windows
Date: Fri, 28 Sep 2007 22:29:20 +0200
Organization: Development Proletcult Cadre #23
Lines: 35
Message-ID: <87ve9uwn33.fsf@bravo.nunatak.allgaeu.org>
References: <fdh4ft$4tb$1@fred.mathworks.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.t-online.com 1191012308 03 10874 byS11wU65iKGSPYO 070928 20:45:08
X-Complaints-To: usenet-abuse@t-online.de
X-ID: TDHZWkZBoe1Aw94WARHQ8e0HbI1CC+I8TATZb6FwJsK4jqwQ3+lGU-
X-Face: &_l@,v,={27&f~U1u&T}}@PiTrV\4A7due$J*se+PiDvOWS][xPeQt/3_5MBC6]tT}a;0te%<^Tv]Qog%#OsE;AeVgoye>u/9@!Z`$>v[(=ps'%<XU:rR5C&EGM#$R~mH2[#Z;
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Cancel-Lock: sha1:jCqLwg1iFwYdzsg4OP6ro0Rv1E0=
Xref: news.mathworks.com comp.soft-sys.matlab:430653



"Lars Barring" <lars.barring@myworkplace.se> writes:

> We have a some Linux C-library code that has been 
> successfully mexed for Linux. Now we would like to 
> transport this this to the Windows environment.
>
> I have very little experience in this area so all 
> suggestions would be welcome. I have been searching the 
> web and found some web pages on mingw, cygwin, and 
> gnumex. While these seems to be pointing in the right 
> direction, more direct/specific/hands-on suggestions and 
> experience would be most welcome. 

Hi Lars,

if you want to create Windows MEX files using a Unix style build
environment, you have to setup a cross-compiler (either Linux:MinGW
or Cygwin:MinGW).  Then compilation is as easy as

# Directory containing a copy of $MATLAB/bin, $MATLAB/extern, and
# $MATLAB/simulink/include from a Matlab Windows installation.
export MATLAB=/opt/w32/matlab-6.1
export MATLAB_ARCH=win32
export MEXEXT=dll
/configure --build=i686-pc-linux-gnu --host=i686-pc-mingw32

Useful tools can be found at

http://home.allgaeu.org/rschleic/rs/pub/m-config/
http://home.allgaeu.org/rschleic/rs/pub/mextool/

-- 
Ralph

5425 days of Linux experience.