谢谢各位,又有个新问题,还是出错:
Compiling resources...
Compiling...
MainFrm.cpp
F:\wanggh\GetConnectState\复件 traytest1\MainFrm.cpp(13) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
socketx.cpp
F:\wanggh\GetConnectState\复件 traytest1\socketx.cpp(4) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
StatLink.cpp
F:\wanggh\GetConnectState\复件 traytest1\StatLink.cpp(9) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
StatLink_.cpp
F:\wanggh\GetConnectState\复件 traytest1\StatLink_.cpp(10) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
StdAfx.cpp
F:\wanggh\GetConnectState\复件 traytest1\StdAfx.cpp(5) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
TRAYICON.CPP
F:\wanggh\GetConnectState\复件 traytest1\TRAYICON.CPP(5) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
TrayTest.cpp
F:\wanggh\GetConnectState\复件 traytest1\TrayTest.cpp(11) : fatal error C1083: Cannot open precompiled header file: 'Release/TrayTest.pch': No such file or directory
Generating Code...
Error executing cl.exe.TrayTest.exe - 7 error(s), 0 warning(s)

解决方案 »

  1.   

    可能是没有#include "stdafx.h"
      

  2.   

    除了源文件,其它文件都删掉,尤其是TrayTest.pch。
    然后REBUILD ALL
      

  3.   

    重新建个工程吧,原来我也遇到过,好像在project->Settings中的C/C++页categray选择precompiled headers,然后选择no ussing precompiled headers试试
      

  4.   

    工程中包含的文件是否在当前目录?或者用Add Files to把这些文件重新添加到工程中。
      

  5.   

    menu : project->setting, C/C++ tab -> Category select "Precompiled Headers",第一个是不要,第四个是要