필터 지우기
필터 지우기

Assuring mex compatibility on different systems

조회 수: 41 (최근 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 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