- The environment used by the IDE does not have the correct directories to search for such tools as Vcspawn.exe.
- The ComSpec environment variable may be incorrectly defined.
- The system's NULL device may be disabled or missing (Microsoft Windows NT only).
Resolution 1: Install or re-enable NULL device (Windows NT only)There are slight variations on the displayed error text. These variations can sometimes help to identify what is causing the problem. If the error text resembles the following, you may have problems opening the NULL device:
- From Control Panel, open the Devices manager.
- Look for the Null device in the list of devices. If you do not have a Null device, you must reinstall Null.sys.
- The Null device should show Status=Started and Startup=System.
- To correct the Status setting, select the Null device and click Start.
- To correct the Startup setting, select the Null device, click Startup, and then select System.
Resolution 2: Correct the IDE environmentIf you have the following error text variation, you probably have errors in the ComSpec definition or the IDE environment, which specifies where to find the tools:
- From the Tools menu, click Options.
- Click the Directories tab, and under Show Directories for, select Executable Files.
- The following five directories should be listed in this order: Correct the directory list to point to valid directories:
- (Your VC install location)\Common\MSDev98\Bin;
- (Your VC install location)\VC98\BIN;
- (Your VC install location)\Common\TOOLS;
- Your Windows system directory (often this is C:\WINNT\system32)
- Your Windows directory (often this is C:\WINNT)
- Test these directories by double-clicking them, and then click the ellipses [...]. Alternatively, copy the directory to the clipboard. Then, on the Start menu, click Run, and paste the directory into the Open text box. This method should bring up Windows Explorer with that directory.
- To add a new directory, double-click an empty box and then click the ellipses [...].
NOTE: The "...\MSDev98\Bin" directory contains Vcspawn.exe and should be first in the list.
Resolution 3: Use the system environmentAn alternative way of specifying the executable paths is to use the /USEENV argument when starting MSDEV (Visual C++). The command line resembles the following:
This action forces Visual C to use the system environment settings rather than the directories specified in Options under the Tools menu. This will help if the system environment variables are all correct; for example, if you can build successfully from a command prompt.
NOTE: Resolution 2 is usually recommended over using the /USEENV switch. For additional information about a bug that was fixed in Service Pack 3, please click the article number below to view the article in the Microsoft Knowledge Base:
Resolution 4: Correct the ComSpec environment variable definitionIf the paths look correct (see Resolution 2), the problem may be with the ComSpec environment variable. The ComSpec environment variable identifies the command prompt executable. On Windows NT, this usually resembles the following:
On Windows 95 or Windows 98, it typically resembles the following:
To check, set, or change the value of the ComSpec environment variable:
- On Windows NT:
- From the Start menu, point to Settings, then click Control Panel.
- Double-click the System icon (this action displays all existing environment variables and their values).
- Add or modify the ComSpec variable, as necessary.
- On Windows 9x:
- From the MS-DOS prompt, enter set ComSpec. This action either displays the current value of the ComSpec environment variable, or "Environment Variable ComSpec not defined."
- Edit the Autoexec.bat file to modify or add ComSpec to the system as necessary.
This problem was corrected in Microsoft Visual C++ .NET.
ID d'article : 236092 - Dernière mise à jour : 19 juin 2014 - Révision : 1