--------------------Configuration: Damon - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\...\执行文件\daemon\stdafx.h(5) : warning C4185: ignoring unknown #import attribute 'no_namespaces'
c:\...\执行文件\daemon\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file or directory
Error executing bscmake.exe.怎么解决?

解决方案 »

  1.   

    是你的文件引入有问题,好像书写还有些错误
    #import "d:\program files\common files\system\ado\msado15.dll" \
    no_namespace \
    rename ("EOF", "adoEOF")
    这样看能不能解决
      

  2.   

    #import "c:\program files\common files\system\ado\msado15.dll" no_namespaces rename("EOF","adoEOF"), rename("BOF","adoBOF")atdafx.h文件里第一行代码
      

  3.   

    rs.CreateInstance("ADODB.Recordset");
    rs->Open(bstrsql, _variant_t((IDispatch*)conn, true), adOpenStatic,adLockOptimistic,adCmdText);C:\...\执行文件\Daemon\DamonDlg.cpp(716) : error C2440: 'type cast' : cannot convert from 'class _com_ptr_t<class _com_IIID<struct _Connection,&struct __s_GUID  _GUID_00000550_0000_0010_8000_00aa006d2ea4> > CDamonDlg::*' to 'struct IDispatch *'Connection对象不能是全局变量吗 VC里用ADO比Delphi麻烦多了