Errors related to Simulink containing Embedded Matlab Function
Afficher commentaires plus anciens
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.
Réponses (1)
Kaustubha Govind
le 24 Fév 2012
0 votes
You need to run the "mex -setup" command and select your installed compiler.
16 commentaires
Nitin Reddy Ganna
le 24 Fév 2012
Kaustubha Govind
le 24 Fév 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
le 27 Fév 2012
Kaustubha Govind
le 27 Fév 2012
Do you have C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe present on your machine?
Nitin Reddy Ganna
le 28 Fév 2012
Kaustubha Govind
le 28 Fév 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
le 29 Fév 2012
Kaustubha Govind
le 29 Fév 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
le 2 Mar 2012
Kaustubha Govind
le 2 Mar 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
le 2 Mar 2012
Kaustubha Govind
le 5 Mar 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
le 7 Mar 2012
Kaustubha Govind
le 8 Mar 2012
Does "mex -setup" locate your compiler automatically now?
Nitin Reddy Ganna
le 8 Mar 2012
Kaustubha Govind
le 9 Mar 2012
Okay - it looks like this is going nowhere. I would recommend contacting Tech Support if you have a license that is on maintenance.
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!