Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
MEX files Matlab version dependent?

Subject: MEX files Matlab version dependent?

From: Chuck37

Date: 23 Jan, 2013 17:02:08

Message: 1 of 2

I have some mex files I made with codegen and they run fine for me running 2012b. If I try to run them on the same machine using 2012a they crash with an undefined symbol error. Is this the expected behavior, that MEX files are not backwards compatible with matlab versions?

Subject: MEX files Matlab version dependent?

From: James Tursa

Date: 23 Jan, 2013 22:08:08

Message: 2 of 2

"Chuck37" wrote in message <kdp52g$kqq$1@newscl01ah.mathworks.com>...
> I have some mex files I made with codegen and they run fine for me running 2012b. If I try to run them on the same machine using 2012a they crash with an undefined symbol error. Is this the expected behavior, that MEX files are not backwards compatible with matlab versions?

Unfortunately, mex routines are not in general portable between MATLAB versions. Sometimes they work and sometimes they don't depending on which MATLAB routines they attempt to access and how those routines work (which you don't have any control over). Your only solution is to re-compile for the other version.

James Tursa

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us