Assuring mex compatibility on different systems

17 ビュー (過去 30 日間)
Brian
Brian 2016 年 8 月 10 日
コメント済み: Walter Roberson 2018 年 4 月 27 日
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 Center および File ExchangeWrite 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