- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All
I am trying to generate a S-function with extension .mex32 by MATLAB2015a (32bit). I typed mex -setup in to the command window and try to select a Fortran compiler while there is a eorror like this.
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2015a/win32.html.
I am wondering what is the reason for this. I am using Microsoft Visual Studio 2013 and Intel Parallel Studio XE 2016. In this case, could I compile a S-function with Fortran as the source file? If not, what should I do as I can not find the old version of Intel Parallel Studio XE on line.
Regards
XING WEI
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This really sounds like a Matlab question. Have you tried asking Matlab support? I note that the URL in the error message no longer works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve
Maybe I did not copy all the words shown on Matlab. It is as follows.
mex -setup
MEX configured to use 'Microsoft Visual C++ 2013 Professional (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different C compiler, select one from the following:
lcc-win32 mex -setup:'C:\Program Files (x86)\MATLAB\R2015a\bin\win32\mexopts\lcc-win32.xml' C
Microsoft Visual C++ 2013 Professional (C) mex -setup:C:\Users\u1591961\AppData\Roaming\MathWorks\MATLAB\R2015a\mex_C_win32.xml C
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2015a/win32.html.
I would like to choose a compiler for Fortran hence I clicked mex -setup FORTRAN and then the error message appeared. Actually I am wondering if Intel Parallel Studio XE 2016 is compatible with MATLAB 2015a (32bit) because I am using Intel Parallel Studio XE 2016 and Microsoft Visual Studio and MATLAB 2015a (32bit) to generate S-function. Thank you!
Regards
XING WEI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is one thing to try to solve the solve the problem. Sometimes, it will work. Open a 32-bit Intel Fortran Command Window from the Start Menu; run Matlab from that command window (you may need to type the full path to the Matlab EXE); do "mex -setup" inside the Matlab command window.
Personally, I have found it a lot easier to build Mex files inside a Fortran or C compiler command window, outside of Matlab, after adjusting %PATH%, %INCLUDE% and %LIB% to include the respective Matlab extern directories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Mecej4
I tried to open MATLAB from Intel Fortran Command Window while when I do "mex -setup", the error still exists. Actually I am worrying that the version Intel Parallel Studio XE 2016 I am using dose not match with MATLAB 2015a. Can anyone tell me about that?
Regards
XING WEI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Xing Wei: As I hinted in #4, the Matlab Mex setup script is unnecessarily strict. However, it may be possible to build a .mex file outside Matlab and then use it from Matlab. I have Matlab 2015a under Windows 10, so I can try to build a .mex file if you provide the source file (I do not use Simulink, nor do I have it installed, so if Simulink libraries are needed to build an S-function .mex, I cannot help).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page