在写数据采集卡程序时,我用厂方提供的*.c和*.h,但最后编译会出现
e:\程序\initialize\iso813.c(78) : fatal error C1010: unexpected end of file while looking for precompiled header directive
请大家指教!我使用的开发平台是win2000+vc6.0代码在:http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=62514&forum_id=34

解决方案 »

  1.   

    在出错的CPP头部加上:#include "stdafx.h"试试看
      

  2.   

    .c 文件第一行加上 #include "stdafx.h"或者在project->setting->c/c++ ->category ->precomciled headers -> 设置为not using precomciled headers
      

  3.   

    照你们说的方法加入出现了以下错误!
    fatal error C1853: 'Debug/Initialize.pch' is not a precompiled header file created with this compiler
      

  4.   

    直接Build。
    Compile时我也遇到过,Build一次后就不在出现这个问题了。
      

  5.   

    使用rebuild all试试,这个可能与你的工程有关系,你不妨重新简历一个工程,添加文件试试
      

  6.   

    有高手给我讲了如下修改::::
    在 ISO813中有如下定义
    #define WORD    unsigned int
    而在WIN32中int为32位,所以会出现operand size conflict
    解决办法: 把此句注掉,或改成 #define WORD unsigned short  //c++中的定义
    另外把汇编中用到的变量由int类型改成WORD型。但我修改后,出现如下错误! 
    Compiling...
    ISO813.C
    Linking...
    Initialize.obj : error LNK2001: unresolved external symbol "unsigned short __cdecl ISO813_Check_Address(unsigned short)" (?ISO813_Check_Address@@YAGG@Z)
    ISO813.OBJ : error LNK2001: unresolved external symbol _ISO813_TimerDelay
    Debug/Initialize.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.Initialize.exe - 3 error(s), 0 warning(s)
      

  7.   

    extern "C"
    {
    #include "*.h"
    }