Path: news.mathworks.com!not-for-mail
From: "Chris Van Kleeck" <vankleec@ualberta.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: mex linux source for windows
Date: Fri, 1 Feb 2008 17:20:19 +0000 (UTC)
Organization: University of Alberta
Lines: 45
Message-ID: <fnvkcj$89e$1@fred.mathworks.com>
References: <fdh4ft$4tb$1@fred.mathworks.com> <87ve9uwn33.fsf@bravo.nunatak.allgaeu.org>
Reply-To: "Chris Van Kleeck" <vankleec@ualberta.ca>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1201886419 8494 172.30.248.38 (1 Feb 2008 17:20:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 1 Feb 2008 17:20:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1267152
Xref: news.mathworks.com comp.soft-sys.matlab:448796



Ralph Schleicher <rs+usenet@nunatak.allgaeu.org> wrote in
message <87ve9uwn33.fsf@bravo.nunatak.allgaeu.org>...
> "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



Ralph,
Do you know if it is possible to use a Linux compiled mex
function as a s-function in Simulink (DOS). Or is there
another cross compiler required to do this?