MainFrm.cpp
e:\msdev98\myprojects\ex_odbc\mainfrm.cpp(4) : fatal error C1083: Cannot open precompiled header file: 'Debug/Ex_ODBC.pch': No such file or directory
执行 cl.exe 时出错.MainFrm.obj - 1 error(s), 0 warning(s)
显示是:cannot open precompiled header file: 'Debug/Ex_ODBC.pch':No such file or directory

解决方案 »

  1.   

    重新编译是将debug删除后编译吗?还是一样的错误亚呀
      

  2.   

    到FileView窗口下,找到stdafx.cpp,右键菜单,编译顺便到Project Setting->C/C++->Precompiled Headers下看看设置对不对。如果还不行,就设置为"Not using precomiled headers",这样就不会出现这种问题了,但会导致编译时间变长
      

  3.   

    那也可以直接选择菜单Build,然后选择ReBuild All~
      

  4.   

    不要使用预编译头文件。如果一定要使用,那么必须在include其它头文件之前#include "stdafx.h"……也可能问题不出在这里……嗯