Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling mex-file under 64bit-linux

0 views
Skip to first unread message

Friedrich Gottelt

unread,
Mar 2, 2007, 3:43:16 AM3/2/07
to
I want to use some Fortran-Code from Matlab using a Mex-file. This
worked well under linux 32bit. But when I changed to 64bit Linux
involving 64bit MAtlab, I get a segmentation fault when calling that
mex. The Compilation with mex is obviously completed withaout any
error and a *.mexa64 is created. It seems that the last action before
crashing is calling the matlab function mxgetM in the gateway
routine. Is there anything to regard when using this function under
64bit operating systems??
TThanks in advance, Friedrich

Christopher Hulbert

unread,
Mar 2, 2007, 6:06:24 AM3/2/07
to

The most common cause of this is a mismatch in pointer size. All pointers need
to be 8 bytes for 64-bit linux compared to the 4 bytes for 32-bit linux.

Friedrich Gottelt

unread,
Mar 2, 2007, 7:11:51 AM3/2/07
to
dear Christopher, thanks for your quick reply! changing the size of
the pointers was the solution!!
0 new messages