[14995] in Athena Bugs
Matlab + Linux bug
daemon@ATHENA.MIT.EDU (David Soleau Lum)
Tue Mar 11 14:45:30 1997
Date: Tue, 11 Mar 1997 14:45:12 -0500
From: David Soleau Lum <davknav@MIT.EDU>
To: bugs@MIT.EDU
Hi.
I've been trying to get a Matlab MEX file to compile under Linux.
Using the "cmex" script and sample "mextest1.c" file in the matlab
locker, things *seem* to work OK until you actually invoke the
resulting .mex file in Matlab:
>> mextest1
/mit/matlab/linuxbin/matlab42.x: can't resolve symbol '__isnanl'
/mit/matlab/linuxbin/matlab42.x: can't resolve symbol '__getfpucw'
/mit/matlab/linuxbin/matlab42.x: can't resolve symbol '__isinfl'
/mit/matlab/linuxbin/matlab42.x: can't resolve symbol '__errno_location'
Unable to load mex file:
Unable to resolve symbol
??? Invalid MEX-file
--
After some more playing around, I got it to work. It turns out that
you have to explicitly tell the cmex script to link against the C
library, like this:
cmex -lc mextest1.c
but this isn't obvious from the documentation. I was hoping that
someone could edit the Athena "cmex" script to also include "-lc" in
the LD_CCLIBS option list for Linux machines.
Dave
--
------------------------------------------------------------------------
David Lum | davknav@mit.edu
55 Dinsmore Ave. #607 | 617-253-2589 (work)
Framingham, MA 01702 | 508-620-9574 (home)
------------------------------------------------------------------------