From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Error NMAKE for simulink model

Solved!
Go to solution

I have gone through the procedure of how to create dll file from simulink models http://digital.ni.com/public.nsf/allkb/D70E74FDA37CD8E486257990000603A0 and havent been able to successfully build the dll file for my model.

 

I have installed the Visual Studio 2008 and i can see the Veristand Relatime Workshop has been added to the matlab. However I am getting the error listed below.

 

The system cannot find the path specified.
NMAKE : fatal error U1077: 'copy' : return code '0x1'
Stop.
 
D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>echo The make command returned an error of 2 
The make command returned an error of 2
 
D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Real-Time Workshop build procedure for model: 'CabinTemp_NI' aborted due to an error.

 

Matlabe error window has the explaination as listed below:

It appears that the build process was unable to locate some utility (e.g. make,
compiler, linker, etc.). Please verify your path and tool environment variables
are correct. You should be able to execute the make command:
.\CabinTemp_NI.bat
at an MS DOS Command Prompt in the directory:
D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw
Currently, this generates the following error:

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>set MATLAB=C:\Program Files (x86)\MATLAB\R2010bSP1

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>set MSVCDir=c:\program files (x86)\microsoft visual studio 9.0\VC

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>"C:\Program Files (x86)\MATLAB\R2010bSP1\rtw\bin\win32\envcheck" INCLUDE "c:\program files (x86)\microsoft visual studio 9.0\VC\include"

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>if errorlevel 1 goto vcvars32

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>set VSINSTALLDIR=c:\program files (x86)\microsoft visual studio 9.0

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>set VCINSTALLDIR=c:\program files (x86)\microsoft visual studio 9.0\VC

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>set FrameworkSDKDir=c:\program files (x86)\microsoft visual studio 9.0\SDK\v3.5

D:\users\f46123a\Desktop\Controls\Software\Models\Inputs\CabinTemp_NI_niVeriStand_rtw>call "C:\Program Files (x86)\MATLAB\R2010bSP1\toolbox\rtw\rtw\private\vcvars32_900.bat"
Setting environment for using Microsoft Visual Studio 2008
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)

 

I have the correct compiler set but i am not able to resolve this error. I have also attached the text file which has the log for the build process.

 

Can anyone please help me with this? where am I wrong or what am I doing wrong?

 

 

Thanks,

 

 

0 Kudos
Message 1 of 5
(12,360 Views)
Solution
Accepted by topic author Jigar273

Hi Jigar273,

 

1) Have you configured MATLAB to use the MSVC++ 2008 compiler? If not, then simply type mex -setup in the MATLAB Command Window and follow the printed instructions.

2) Open the Windows Command Prompt and type %NIVERISTAND_ROOT% and press Enter. Does calling this environment variable return C:\VeriStand? If not, then please add this environment variable with the value of C:\VeriStand to your system and then restart the PC. To do this, follow the instructions as described in the link: http://support.microsoft.com/kb/310519

Nestor
Message 2 of 5
(12,355 Views)

Hi Nestor,

 

Thanks for the reply.

 

1.) I did perform the mex -setup command in MATLAB to select the MSVC++ 2008 compiler.

2.) Can you please elaborate more on how and where to add %NIVERISTAND_ROOT% environmental variable? I did the windows command as you suggested and it took to me different location than C:\Veristand.

 

Appriciate your response.

 

Thanks,

Jigar

0 Kudos
Message 3 of 5
(12,353 Views)

Thank you very much, Nestor.

 

I was struggling for a while with this. I can build it now.

0 Kudos
Message 4 of 5
(12,347 Views)

i am also having same problem in my matlab 'It appears that the build process was unable to locate some utility (e.g. make, compiler, linker, etc.)'

please help me if you know how to solve it

 

 


thank you

0 Kudos
Message 5 of 5
(11,259 Views)