Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!z34g2000vbl.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: create 32 bit mex files from 64 bit matlab?
Date: Tue, 6 Oct 2009 09:06:42 -0700 (PDT)
Organization: http://groups.google.com
Lines: 31
Message-ID: <7bc56d44-508b-4ada-b957-416fcf2f056c@z34g2000vbl.googlegroups.com>
References: <ha50cg$nim$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.74.182
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1254845202 6748 127.0.0.1 (6 Oct 2009 16:06:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Oct 2009 16:06:42 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: z34g2000vbl.googlegroups.com; posting-host=77.17.74.182; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; 
	.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:575365


On 2 Okt, 15:49, "Sriram Swaminarayan" <sri...@lanl.gov> wrote:
> platform: osx, intel
> matlab: 7.9.0.529 (R2009b), 64-bit (maci64), August 12, 2009
>
> I want to create .mexmaci files using mex, but it looks like I have no way to create them using the mex that ships with this version of matlab.  
>
> Even if I use 'mex -arch maci ', it still only creates '.mexmaci64' files.
>
> Is there a simple way around this, or do I have to keep a 32 bit version of matlab around to create the '.mexmaci' files?

It depends on the compiler, which needs to be able to
produce both 32-bit and 64-bit dlls and executables.
Once you have such a compiler (not all compilers can
do this), you will need to trick matlab/MEX to call the
compiler in 32-bit mode instead of 64-bit mode. Which
may or may not be possible.

Last, you might need to use matlab in 32-bit mode in
order to test the MEX file.

It might be most convenient to install a 32-bit
version of matlab on your 64-bit system, and do all
the 32-bit mex stuff under this version.

Provided, of course, that a 64-bit and a 32-bit matlab
can coexist on your system. Which may or may ot be the case.

Rune