0

I am trying to run a previously validated C mex file on a new system. It worked correctly, with no errors, in MATLAB R2014a on Mac OS X 10.8. I am now trying to get it to run in R2015a on Mac OS X 10.10.

At first it wouldn't run because it couldn't find the MPFR library which my C code requires, so I re-installed MPFR and re-compiled the mex file with an appropriate link. The mex file compiled without any errors or warnings, but it does not run. The program doesn't throw errors either - it just hangs. I cannot ctrl-C it either, I have to force quit MATLAB.

I generally try to post more specific questions, but to be honest I have no clue as to what the problem could be here. Thanks in advance for any help.

EDIT 7-12-15 at 12:15 AM EST

This question is NOT a duplicate of the one referenced by rayryeng. My code is not crashing or generating a segmentation fault (or any error at all), unlike the referenced case. Moreover, since the code ran correctly and stably (in my own hands) on the older machine, I suspect some kind of platform- or version-dependent issue rather than bad code that needs to be debugged.

Dan
  • 1
  • 2
  • You should consider stepping through the MEX code by attaching it to a compatible IDE. Please see my post on how to get that running (duplicate link). – rayryeng Jul 12 '15 at 01:01
  • @rayryeng - please see my edit above. – Dan Jul 12 '15 at 04:22
  • Your question is not an _exact_ duplicate of the one referenced by rayryeng, and while it's kind of a stretch to claim that it is - rayryeng is correct in that the answer he provided for that question will aid you in resolving the issue you're having here (by directing you to debug utilities to find out what is hanging). I think he should port his answer here in some form or fashion and remove the duplicate marking though as the two questions are only related in so much as the overly broad "here's some debug tools" answer is useful for both. – Brandon Buck Jul 12 '15 at 07:28
  • Attach and step into the mexfunction as suggested above. Also try compiling with mex with `-v` to see if there are any warnings. – chappjc Jul 14 '15 at 16:22

0 Answers0