我在工程找加入comn_i.c文件  结果提示错误  fatal  error  C1010:  unexpected  end  of  file  while  looking  for  precompiled  header  directive  
我把comn_i.c放进StdAfx.h中提示fatal  error  C1083:  Cannot  open  include  file:  comn_i.c:  No  such  file  or  directory  
怎么办呀!

解决方案 »

  1.   

    把StdAfx.放进hcomn_i.c中
    #include "stdafx.h"
    rebuild all
      

  2.   

    无数人问过
    FAQ中就有两条
    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=192721
    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=89
    comn_i.c放进StdAfx.h中??
    应该是StdAfx.h放进comn_i.c中
      

  3.   

    要么#include "stdafx.h"放到comn_i.c的第一行要么去设置comn_i.c的编译属性,使之不使用precompile header
      

  4.   

    我在comn_i.c的第一行加了#include "stdafx.h"
    编译提示:
    fatal error C1853: 'Debug/ClientDll.pch' is not a precompiled header file created with this compiler
    怎么办?
      

  5.   

    问之前先搜一下,与你相同的问题:
    http://community.csdn.net/Expert/topic/3358/3358388.xml?temp=.7596399
    http://community.csdn.net/Expert/topic/3358/3358797.xml?temp=.5074427
    rebuild all应该就可以了
      

  6.   

    可以不使用comn_i.c文件的.通过__uuidof来得到clsid或者iid.就是使用也没有问题的.
    不要把.c文件加到工程中.
    只要#include "comn_i.c"就行了.
      

  7.   

    在C语言的头文件*.h的开始处加上
    #ifdef __cplusplus
    extern "C"
    {
    #endif结尾处加上
    #ifdef __cplusplus
    }
    #endif
      

  8.   

    不要把.c加入到工程里面,这样就不会去编译这个文件
    在使用接口的文件前面#include "XXX_i.c",可以找到iid和clsid
      

  9.   


    或者,把iid和clsid的定义从XXX_i.c中拿出来,放到需要使用的地方
      

  10.   

    在工程中设置去掉预定一偷文件应该也可以。
    [C/C++]->PreCompiled Headers 选择“no useing precompiled headers ”
      

  11.   

    在工程中,按下"Alt+F7",选择C/C++ -> Category -> PreCompiled Headers -> no useing precompiled headers 咦,和楼上一样