Assuring mex compatibility on different systems

16 次查看(过去 30 天)
Hi there,
I'm looking at creating some mex libraries that will be used by other people. I need to know what is involved with assuring compatibility across different systems. I need to have support for Linux, Windows, and Mac OS X.
In general, I understand the mex file-suffix naming conventions that represent system OS and architecture, such as .mexw32 for x86 Windows, .mexw64 for x64 Windows, mexa32, mexa64 for linux x86 and x64 respectively, mexmaci, and mexmaci64 for Mac OS x86 and x64 respectively.
However, I am unsure if there are any additional stipulations for assuring compatibility of sharing mex files to users who are using MATLAB in a variety of environments.
For example, if I build a mex on my Windows 7 x64 machine with MATLAB 2015a, will another user be able to run it just fine with Windows 10 x64 and MATLAB 2016a?
What about building on Ubuntu 16, will a user using Ubuntu 12 be able to run the mex?
So I really need to know how cross-system compatibility of pre-compiled mexed code is supported, or not?
I don't want other users to have to bother with the process of compiling my mex, and I want to provide mex files of my code that will be supported on a wide range of systems. What do I have to know to make this possible?
Thanks, Brian

采纳的回答

James Tursa
James Tursa 2016-8-11
There is NO assured compatibility of compiled mex code across different versions, operating systems, or platforms. The only assured compatibility for compiled mex code is to run under the same MATLAB version on the same operating system and platform. You might be lucky and get the same mex code to run under a different MATLAB version, but it just depends on what versions are involved as to whether you will get lucky or not. Your goal of having a single mex routine that can seamlessly be run by users across different MATLAB versions etc cannot in general be realized.
  7 个评论
Matt J
Matt J 2018-4-27
version-specific issues perhaps, but platform-specific issues?
Walter Roberson
Walter Roberson 2018-4-27
I was responding to Brian's question about "Is it then generally safe"

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by