MEX for different platforms - deployment question.
7 ビュー (過去 30 日間)
古いコメントを表示
HI,
I have some software than will be used by different members of a team. Everyone has matlab, but annoyingly on different platforms (i.e. Linux, Win and OSX).
There is some fortran mex involved, which compiles without problem on Linux, but annoyingly we don't have compatible Fortran compilers on Windows (or MAc, but that's probably in Xcode somewhere I guess).
My question is can you use mex to compile for different targets? So on the linux machine (gfortran) it makes xxxx.mexa64, is it possible to get it to make xxxx.mexw64 and xxxx.mexmaci with some switch or something?
I have coder, but don't see how that would help because the source is Fortran.
My third option would be maybe to build the Fortran as a shared library in each case and try 'loadlibrary' maybe?
So basically, I'm developing on Linux, the code needs a Fortran mex but I need to be able to deploy on Mac and Windows also. What's considered best practice for this kind of thing?
Cheers,
Arwel
1 件のコメント
Walter Roberson
2019 年 3 月 20 日
編集済み: Walter Roberson
2019 年 3 月 20 日
Note: the only supported Fortran for Mac is Intel Parallel Studios https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2018b-supported-compilers.pdf . You might be able to hack g77 to work, but it is not supported.
回答 (1 件)
Walter Roberson
2019 年 3 月 20 日
No; you have to compile on a compatible system. The only cross-compilation support that existed historically was that you used to be able to target Windows 32 bit systems while running on Windows 64 bit.
On Linux you just might be able to work something out involving Vine or similar to run Windows in parallel, but it would probably be a nuisance.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fortran with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!