Errors related to Simulink containing Embedded Matlab Function
Ältere Kommentare anzeigen
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.
Antworten (1)
Kaustubha Govind
am 24 Feb. 2012
0 Stimmen
You need to run the "mex -setup" command and select your installed compiler.
16 Kommentare
Nitin Reddy Ganna
am 24 Feb. 2012
Kaustubha Govind
am 24 Feb. 2012
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
am 27 Feb. 2012
Kaustubha Govind
am 27 Feb. 2012
Do you have C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe present on your machine?
Nitin Reddy Ganna
am 28 Feb. 2012
Kaustubha Govind
am 28 Feb. 2012
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
am 29 Feb. 2012
Kaustubha Govind
am 29 Feb. 2012
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
am 2 Mär. 2012
Kaustubha Govind
am 2 Mär. 2012
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
am 2 Mär. 2012
Kaustubha Govind
am 5 Mär. 2012
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
am 7 Mär. 2012
Kaustubha Govind
am 8 Mär. 2012
Does "mex -setup" locate your compiler automatically now?
Nitin Reddy Ganna
am 8 Mär. 2012
Kaustubha Govind
am 9 Mär. 2012
Okay - it looks like this is going nowhere. I would recommend contacting Tech Support if you have a license that is on maintenance.
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!