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!