1

There is this warning kind of message when compiling mexFunction files using the mex command in Matlab 2014b.

Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version of MATLAB.

What is this supposed to mean? There comes a link with this message, but I did not find something useful. Also this question did not make me more wise.

Will the MEX API vanish? Will there be a different interface? What is going to change exactly? Can anybody tell?

Community
  • 1
  • 1
embert
  • 7,336
  • 10
  • 49
  • 78
  • http://stackoverflow.com/questions/26426160/ – nkjt Dec 06 '14 at 09:53
  • @nkjt yes, I linked that in the question, but that does not explain something, does it? *Apart from that, everything looks fine* - okay, right now. But what's going to change when *MEX infrastructure..will be removed*? Will Mex functions still be supported and will there be an interface to C/C++? – embert Dec 06 '14 at 10:44
  • Mathworks will not remove the MEX interface, as many of their built-in functions rely on MEX. I assume you are using some deprecated functions or options. Without any information, one cannot say where the problem is. You can check the [Release notes](http://www.mathworks.com/help/matlab/release-notes.html) for changes in the MEX interface. (See the *functionality being removed* section) – hbaderts Dec 06 '14 at 11:26
  • @hbaderts I see. So it just means that there is some `mx` function used, which is going to be removed. Could have made the hint more precise. – embert Dec 06 '14 at 12:12
  • It just means you won't be able to configure with a mexopts.bat in the future. You'll have to use XML. – chappjc Dec 06 '14 at 16:25
  • @chappjc Now I got it, thx. That's what I wanted to know. – embert Dec 06 '14 at 21:00
  • Ok, in that case I made an answer. :) – chappjc Dec 06 '14 at 21:36

1 Answers1

1

The message Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version of MATLAB. just means that the way of setting up MEX with mexopts.bat (Windows) and mexopts.sh (*NIX and MAC) is deprecated and an XML based configuration system ("infrastructure" in their words) will be used going forward. Note that it is not removed yet, just deprecated - you can continue to configure with mexopts.bat but it will bug you about it.

For some suggestions on how to make your own XML, see this answer, just to get started. You will have to do some trial and answer since the intuitive Makefile-like organization of mexopts.bat is gone and replaced with a more complicated system involving automated searches, environment variable reads, etc.

Community
  • 1
  • 1
chappjc
  • 30,359
  • 6
  • 75
  • 132