I have just installed v6.3 for Windows and am trying to run a hyperbuild simulation of a legacy (v6.2 UNIX) model. I suspect that I don't have everything configured right (path to C compiler???) I get the error message "can't find 'nmake'" during simulation. Help!
The Microsoft Visual Studio compiler may not configure the necessary environment variables when it is installed. This must be done manually. Microsoft VisualStudio has a script to setup the environment. It is called vcvars32.bat and is located in \VC98\bin.
There are two ways to set up the environment. The second method is recommended. The first way is to set the environment variables every time Xmath is started from a new DOS window. To do this open a DOS command prompt from the start menu in Windows. Then run vcvars32.bat. After running the batch file, start Xmath from the same command prompt. If you start Xmath from the start menu or a desktop shortcut the environment settings will not have been applied for that session. The environement changes only apply to th e currently opened DOS shell. Other DOS shells are unaffected, so the process must be repeated.
The second way is to change the environment settings in Windows. On Windows NT, 2000 or XP 1. Open Controls Panels from the start menu. 2. Select System Properties. 3. In the System Properties dialog box select environment variables. 4. Enter the variables as defined in vcvars32.bat into the variable and value fields.
If you are only seeing one line in the file it is probably a reference to VSVARS32.bat. VSVARS32.bat will contain the definitions, but depending on what you have installed it may in turn reference other files. Visual Studio used to offer to set the appropriate environment variables at the end of the installation. I don't know if current versions do that still. A suggestion to get the paths that are set would be to:
Open a Command window
Use "set" command to see what is currently configured. Use "set >> filename.txt" to save it to a file.
Run set again. If you save both to a file you can use a diff:ing tool to compare the two to find out what needs to be set.
Sorry I wasn't being very clear either. I was assuming that you were trying to follow option 2 from Joe D's post on 3-24-2004. Once you know what environment variables have changed you can go the control panel to set them. Some of them will may be new variables that you will need to define. Others may already exists in which case you want to append to them.
The other option is as Joe D said, which is to run VCVARS32.bat before you start Xmath. You could even make a batch file such that instead of starting xmath.bat directly you call your own batch file (.bat). This batch file would have two lines. One to run VCVARS32.bat and the second to run XMATH.bat. If you are not familiar with batch files there are a lot of resources on the web about them. In this case all you would need is:
<path to vcvars32.bat>\vcvars32.bat "C:\Program Files\National Instruments\MATRIXx\bin\xmath.bat" -v 71.6
The -v 71.6 is optional. it specifies to specifically open version 7.1.6. If you leave it off the newest version will be opened.