matlab mex files on FreeBSD

cali calculus at softhome.net
Sat Jun 25 13:49:51 GMT 2005


----- Original Message ----- 
From: "cali" <calculus at softhome.net>
To: <freebsd-questions at freebsd.org>
Sent: Tuesday, June 21, 2005 4:47 PM
Subject: matlab mex files on FreeBSD


> Has anyone managed to get matlab mex files compiling and running properly 
> with matlab on FreeBSD?

I'm still interested in this question because I don't know if my solution 
below totally solves the problem.

> I suppose the problem is that matlab is a Linux binary and matlab is 
> running in Linux ABI mode, but the compiler is compiling to FreeBSD 
> native, or something?

It's obvious that this was the problem, one can fix it by changing the 
compilers pointed to
in the glnx86 section of

/compat/linux/usr/local/matlab/bin/mexopts.sh

to

CC='/compat/linux/usr/bin/cc'
CXX='/compat/linux/usr/bin/g++'

and possibly

FC='/compat/linux/usr/bin/f77' (not sure if this is necessary because I 
didn't try compiling fortran files yet)

Just changing the compiler seems to work, at least for simple files anyway. 
If anyone else has experience, please let me know.

Cali 



More information about the freebsd-questions mailing list