01-21-2010 06:48 AM
Hello,
I am trying to make use of Simulink Interface Toolkit LabView2009
with Simulink Matlab 2009b
when i build the simulink file i get error as stated below
" Invalid setting for environment variable MSDevDir or DevEnvDir.
The setting is: ''
You can verify the setting by checking for the existence of:
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 9.0)
%MSDevDir%\..\..\vc98\bin\vcvars32.bat (for Visual C/C++ 6.0)
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 8.0)
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 7.1)
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 8.0)
You must define MSDevDir or DevEnvDir to be:
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 9.0)
set %MSDevDir%=<VisualRoot>\common\msdev98 (for Visual C/C++ 6.0)
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 8.0)
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 7.1)
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 8.0)
This error may be due to an invalid preference file:
C:\Documents and Settings\Nada\Application Data\MathWorks\MATLAB\R2009b\mexopts.bat
Please run "mex -setup" at the MATLAB prompt to correct"
Any idea to solve this problem ?!
i tried many times "mex -setup" but useless !!!
Thanks
01-22-2010 02:55 PM
Hi,
What compiler are you trying to use. The SIT readme lists different compilers that are supported: http://digital.ni.com/public.nsf/allkb/9B769CC7BCB0AD7E86257603006CF042
Are you using one of these?
If you are using one of these, could you be a little more specific about when you are getting this error? Which step in this list is actually generating the error: http://zone.ni.com/reference/en-XX/help/371504E-01/lvsithowto/sit_h_convert_model_to_dll/
08-26-2013 01:15 PM
I had a similar problme recently, then I figured out that my settings of the code generator were different from defaults values. With the default settings for nidll.tlc I could compile code into dll successfully.
08-26-2013 01:26 PM
Also,.....some versions of C++ compilers are not working for this simulink model code generation, better to check Mathworks site for more info.