Errors related to Simulink containing Embedded Matlab Function
古いコメントを表示
I am using Matlab R2011a version 7.12.My platform is windows 7 and 64 bit.When i try to run the simulink model containing embedded function,I get the following error.
"Making simulation target "New_sfun", ...
C:\Users\nitin\Documents\MATLAB\slprj\_sfprj\New\_self\sfun\src>call "mexopts.bat" 'nmake' is not recognized as an internal or external command, operable program or batch file. "
I installed
1.Microsoft Visual studio 2010 SERVICE PACK
2.Microsoft Visual Express c++ 2010 express
3.Microsoft Software Development kit 7.1
4 .NET Framework 4.0
Please kindly help me with this.I searched a lot in the internet,but couldn't solve my problem.
回答 (1 件)
Kaustubha Govind
2012 年 2 月 24 日
0 投票
You need to run the "mex -setup" command and select your installed compiler.
16 件のコメント
Nitin Reddy Ganna
2012 年 2 月 24 日
Kaustubha Govind
2012 年 2 月 24 日
Did the message from "mex -setup" says that the options file was updated successfully? Could you try deleting the "slprj" directory in the folder and try again.
Nitin Reddy Ganna
2012 年 2 月 27 日
Kaustubha Govind
2012 年 2 月 27 日
Do you have C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe present on your machine?
Nitin Reddy Ganna
2012 年 2 月 28 日
Kaustubha Govind
2012 年 2 月 28 日
Okay - try this in a Windows (system) command prompt:
> call "C:\Users\nitin\AppData\Roaming\MathWorks\MATLAB\R2011a\mexopts.bat"
> nmake /?
What do you see?
Nitin Reddy Ganna
2012 年 2 月 29 日
Kaustubha Govind
2012 年 2 月 29 日
Open up C:\Users\nitin\AppData\Roaming\MathWorks\MATLAB\R2011a\mexopts.bat in an editor and see if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" is being added to the system PATH variable correctly. Note that you might need to chase down values of variables such as VCINSTALLDIR that are created earlier in the same batch script.
Nitin Reddy Ganna
2012 年 3 月 2 日
Kaustubha Govind
2012 年 3 月 2 日
See footnote#3 here: http://www.mathworks.com/support/compilers/R2011a/win64.html - by default Visual Studio only installs compilers for 32-bit targets. Since you are using 64-bit MATLAB, you need to make sure that you install the x64 Compilers and Tools package with Visual Studio.
Nitin Reddy Ganna
2012 年 3 月 2 日
Kaustubha Govind
2012 年 3 月 5 日
You shouldn't need to change the mexopts.bat file - it looks like something is wrong with your compiler installation or System PATH variable. Did you install the x64 compilers as I suggested?
Nitin Reddy Ganna
2012 年 3 月 7 日
Kaustubha Govind
2012 年 3 月 8 日
Does "mex -setup" locate your compiler automatically now?
Nitin Reddy Ganna
2012 年 3 月 8 日
Kaustubha Govind
2012 年 3 月 9 日
Okay - it looks like this is going nowhere. I would recommend contacting Tech Support if you have a license that is on maintenance.
カテゴリ
ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!