Why Do I Get an NMAKE Fatal Error When Simulating a model with a Fortran or C UCB? Primary Software: MATRIXxPrimary Software Version: 6.2 Primary Software Fixed Version: N/A Secondary Software:
Problem: I am simulating a model with a Fortran or C UCB (User Code Block). I get a NMAKE fatal error U1077 or U1073. For example the output in Xmath might contain: Remaking dynamic link library ... Compiling ucbhook.for ... fl32 /nologo /MT /Op /c ucbhook.for /Foucbhook.obj ucbhook.for Microsoft (R) Program Maintenance Utility Version 1.62.7022 Copyright (C) Microsoft Corp 1988-1997. All rights reserved. NMAKE : fatal error U1073: don't know how to make 'usr08.obj' What is wrong? Solution: The Visual FORTRAN and Microsoft VisualStudio compilers may not configure the necessary environment variables when it is installed. This must be done manually. There is a script to set up the environment in the Digital FORTRAN distribution. Assuming that the compiler is installed in the default installation directory the script would be located in the 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 dfvars.bat and/or vcvars32.bat. After running the batch files, 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 the 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 the environment tab. 4. Enter the variables as defined in dfvars.bat and/or vcvars32.bat into the variable and value fields. On Windows 98 or 95 add the variables to the Autoexec.bat file. Now the changes will be made for all sessions. So, launching Xmath from the start menu, any dos shell or a desktop shortcut will have the FORTRAN and C compiler environment settings already incorporated. You can verify the configuration by running one of the UCB examples. Type Demo at the Xmath command prompt and then choose SystemBuild>User Code Block (Coulomb) and then either C Language or Fortran UCB. When asked to simulate choose yes. If you choose no the UCB is not compiled. Related Links: Attachments:
Report Date: 08/20/2003 Last Updated: 09/10/2003 Document ID: 30J93UOH |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
