重装VC后,所有的工程打开时提示无法包含文件"afxres.h",我知道这可能与路径设置有关,但不知道怎么改,请教大家!

解决方案 »

  1.   

    搜索结果:afxres.h在C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include目录下。当然,你的不一定。
    你也可以这样,将afxres.h所在目录添加到“Tool->选择->目录”页的Include中就可以了。
    可能你重装的VC和原来的VC不在一个地方
      

  2.   

    你得配置VC的环境,
    包括include,lib,execute等目录
      

  3.   

    我试过了,可是它有提示不能包含winres.h,再把winres.h包含,它有提示不能包含winresrc.h,简直没完了,唉,请问该如何办啊?
      

  4.   

    To:Happyparrot(快乐鹦鹉),您的方法我都试过了,出现我上面的情况。
     To:zhucde(【風間苍月】)(MS_MVP) ,您能具体一点说吗?
      

  5.   

    “Tool->选择->目录”的设置会影响到所有的工程。单个工程的设置在“Project -> Settings ”里边
      

  6.   

    我de问题是:Compiling resources...
    Compiling...
    Error spawning cl.exe
    Creating browse info file...
    Error spawning bscmake.exech1_1.exe - 1 error(s), 0 warning(s)
      

  7.   

    “Tool->选择->目录”的设置会影响到所有的工程。单个工程的设置在“Project -> Settings ”里边
      

  8.   

    Error spawning cl.exe
    Creating browse info file...
    Error spawning bscmake.exe是因为你的vc配置环境中execute目录没有设置,
    可执行的目录由多个,不如重装一遍vc了
      

  9.   

    To: carbon107(<软件开发思想.h>) 自己建没有问题,而且原来自己编的也没有问题,就是一些书的源代码出问题了。
      

  10.   

    虽然是VC5的,但是也还有参考价值吧Q188720
    --------------------------------------------------------------------------------
    The information in this article applies to:Microsoft Visual C++, 32-bit Editions, version 5.0--------------------------------------------------------------------------------
    IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe. SYMPTOMS
    You may get one of the following error messages while building a project in the Developer Studio: Error spawning cl.exe 
    -or- 
    Error executing ~vcecho!Compiling. 
    -or- 
    Or, you might get an application error dialog box with the message: 
    The instruction at "0x500af8b4" referenced memory at
    "0x00000000". The memory could not be "read". Click on OK to terminate application
    Click on CANCEL to debug the application 
    Developer Studio hangs after this error, regardless of the action you take. MORE INFORMATION
    If you get one of the above errors, use the following steps to ensure that your computer has the correct settings: In Microsoft Developer Studio, on the Tools menu, click Options, then click the Directories tab. In the "Show directories for" drop-down list box, select Executable Files. The following paths should be listed, where drive C is the installation drive: If installed on Windows NT:       C:\Program Files\DevStudio\SharedIDE\BIN
          C:\Program Files\DevStudio\VC\BIN
          C:\Program Files\DevStudio\VC\BIN\WINNT 
    If installed on Windows 95:       C:\Program Files\DevStudio\SharedIDE\BIN
          C:\Program Files\DevStudio\VC\BIN
          C:\Program Files\DevStudio\VC\BIN\WIN95 The "COMSPEC" environment variable should have the following value: If installed on Windows NT:       COMSPEC=%SYSTEMROOT%\CMD.EXE 
    To view and modify the COMSPEC environment variable in the NT Operating System, in Control panel, double-click the System icon, then click the Environment tab. The COMSPEC variable should be in the System Variables box. You can add or modify a variable using the Variable and Value edit box. If installed on Windows 95:       COMSPEC=%WINDIR%\COMMAND.COM 
    In Windows 95, type SET in a DOS window; you will see the environment variables. Add or modify an environment variable by adding a SET command to the Autoexec.bat file, and rebooting. 
    If none of the above steps resolves the issue, make sure that installed Windows CE components are installed under a user account with administrative privileges. 
    If none of the above steps work, then uninstall Windows CE components (if installed) and uninstall Visual C++ 5.0. After uninstalling, delete the ..\DevStudio directory in the installed drive, saving any user-created projects before deleting. Then delete the following registry keys if they still exist.       HKEY_CURRENT_USER\Software\Microsoft\DevStudio
          HKEY_CURRENT_USER\Software\Microsoft\Infoviewer\5.0
          HKEY_LOCAL_MACHINE\Software\Microsoft\DevStudio
          HKEY_LOCAL_MACHINE\Software\Microsoft\Infoviewer\5.0 
    Then reinstall Visual C++ version 5.0. Verify that this installation works before installing any Windows CE components. WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).REFERENCES
    For additional information, please see the following article in the Microsoft Knowledge Base: Q165792 MSDEV.EXE Application Error When Building an Application Keywords : kbide kbVC500 
    Issue type : kbprb 
    Technology : kbvc