Executing multiple statements in the command prompt

8 次查看(过去 30 天)
Hello,
I would like to execute the following statements in the cmd prompt from Matlab.
1. First I would like to set the Visual Studio environment parameters. This I do with
dos(['%comspec% /k "' VisualStudio '" x86 >']) ..where VisualStudio is the path to the vcvarsall.bat
2. Then I would like to execute in the same dos prompt above the command
nmake /F makefile.nmake clean
3. Third step is
nmake /F makefile.nmake all
My problem is that after the first dos statement, the statement 2 gives 'nmake' is not recognized as an internal or external command, operable program or batch file.
I need to execute statements 2 and 3 in the same dos prompt. I tried writing a batch file but for some reason the batch file does not execute. After the statement 1 I get Microsoft VS environment set and the rest of the commands do not execute.
Could someone help me out.
Thanks a lot.
Regards
Deepak

回答(1 个)

Walter Roberson
Walter Roberson 2015-9-28

类别

Help CenterFile Exchange 中查找有关 Debugging and Analysis 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by