工程中一加入#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace 就错,为何??错误是。。
error C2629: unexpected 'short ('
c:\test\one\debug\msado15.tlh(1315) : error C2238: unexpected token(s) preceding ';'
c:\test\one\stdafx.cpp(5) : error C2501: 'rename' : missing storage-class or type specifiers
c:\test\one\stdafx.cpp(5) : error C2373: 'rename' : redefinition; different type modifiers
e:\microsoft visual studio\vc98\include\stdio.h(335) : see declaration of 'rename'
c:\test\one\stdafx.cpp(5) : error C2078: too many initializers
c:\test\one\stdafx.cpp(5) : error C2440: 'initializing' : cannot convert from 'char [7]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
c:\test\one\stdafx.cpp(5) : error C2143: syntax error : missing ';' before 'PCH creation point'
Error executing cl.exe.
Creating browse info file...
one.exe - 7 error(s), 1 warning(s)
错误提示处理是
VARIANT_BOOL EOF;
__declspec(property(get=GetAbsolutePage,put=PutAbsolutePage))
PositionEnum_Param AbsolutePage;
__declspec(property(get=GetLockType,put=PutLockType))
enum LockTypeEnum LockType;
__declspec(property(get=GetMaxRecords,put=PutMaxRecords))
问题点数:0、回复次数:3Top
1 楼wang_bluebird(bluebird)回复于 2005-04-05 14:24:05 得分 0
////////////////should be at the file last
//////////////
////////////
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")Top
2 楼wang_bluebird(bluebird)回复于 2005-04-05 14:32:13 得分 0
#pragma warning(disable:4146)
#import "c:\program files\common files\system\ado\msado15.dll" \
rename("EOF","adoEOF")
#pragma warning(default:4146)
using namespace ADODB;
参见
http://blog.csdn.net/laiyiling/archive/2004/08/28/87654.aspxTop
3 楼littleeagle007(007)回复于 2005-04-12 09:34:22 得分 0
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF") rename("EOF","adoEOF")
Top




