问题描述
我正在使用xmllite库版本1.0.1018.0
但是我在尝试构建代码时遇到以下错误。
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(91):error C2065:'__ in':未声明的标识符
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\ xmllite\xmllite.h(91):错误C2143:语法错误:缺少' )'before'const'
c:\ Document and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(91) :警告C4229:使用的时间错误:忽略数据修饰符
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\ xmllite.h(93):错误C2059:语法错误:')'
$
c:\Documents and Settings \bjit_234\\\ ktop \Emglish 20 \ETMDi\app\common \ xmllite \ xmllite.h(97):错误C3861:'__ in':找不到标识符,即使是依赖于参数的查找
c:\ Document and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(97):error C2146:syntax error:missing')'before identifier 'IUnknown'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(97):警告C4229 :使用的时代错误:忽略数据修饰符
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h (102):错误C2059:语法错误:')'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\\ \\ xmllite.h(104):错误C3861:'__ in':找不到标识符,即使有依赖于参数的查找
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(104):错误C2146:语法错误:缺少')'在标识符'IUnknown'之前'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite \ xmllite.h(104):警告C4229:使用了时间错误:忽略数据修饰符
c:\Documents and Settings \bjit_234\Desktop\Emglish 20 \ETMDi\app \ commmon \ xmllite \ xmllite.h(109):错误C2059:语法错误:')'
c:\ Document and Settings \bjit_234\Desktop\Emglish 20 \ ETMDi\app\common\xmllite\xmllite.h(112):错误C3861:'__ in':标识符未找到,即使依赖于参数查找
c:\Documents and Settings \ bjit_234\Desktop\Emglish 20 \ETMDi\app\comm on\xmllite\xmllite.h(112):错误C2143:语法错误:缺少')'在'const'之前的数字
c:\Documents and Settings \bjit_234\Desktop\Emglish 20 \ETMDi\app\common\xmllite\xmllite.h(112):警告C4229:使用的时间错误:忽略数据修饰符
c:\ Document and Settings \ bjit_234 \Desktop\Emglish 20 \ETMDi\app\common\xmllite\xmllite.h(114):错误C2059:语法错误:')'
$
c:\Documents和设置\bjit_234 \Desktop \Emglish 20 \ETMDi \app\common \ xmllite \ xmllite.h(118):错误C3861:'__ in':标识符未找到,即使参数依赖查找
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(118):错误C2146:语法错误:在标识符'IUnknown'之前缺少')'在
c:\Documents and Settings \bjit_234 \Desktop \Emglish 20 \ETMDi \app\common \ xmllite \ xmllite.h(118):警告C4229:使用的时间错误:忽略数据修饰符
c :\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(121):错误C2059:语法错误:')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(123):error C3861:'__ in':标识符not not发现,即使是依赖于参数的查找
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h( 123):错误C2146:语法错误:缺少')'在标识符'IUnknown'之前'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\\ common \ xmllite \ xmllite.h(123):警告C4229:不合时宜使用d:忽略数据修饰符
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(126 ):错误C2059:语法错误:')'
$
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite .h(319):错误C2061:语法错误:标识符'__in_opt'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\\ \\ xmllite\xmllite.h(323):错误C2061:语法错误:标识符'__in'
$
c:\Documents and Settings \bjit_234\Desktop\Emglish 20 \ETMDi \ app\common\xmllite\xmllite.h(329):错误C2061:语法错误:标识符'__in'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20 \ETMDi\app\common\xmllite\xmllite.h(335):错误C2061:语法错误:identifier'__out_opt'
c:\ Document and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(339):错误C2061:语法错误:标识符'__out'
$
c:\Documents and Settings \bjit_234\Desktop\Emglish 20 \ETMDi\app\common \ xmllite \ xmllite。 h(347):错误C2061:语法错误:标识符'__in'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\ xmllite \ xmllite.h(355):错误C2061:语法错误:标识符'__out'
$
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app \ commmon \ xmllite \ xmllite.h(361):错误C2061:语法错误:标识符'__out'
c:\ Document and Settings \bjit_234\Desktop\Emglish 20 \\ \\ SETMDi \app\common \ xmllite \ xmllite.h(367):错误C2061:synta x错误:标识符'__out'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(373 ):错误C2061:语法错误:标识符'__out'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite \ xmllite.h(379):错误C2061:语法错误:标识符'__out'
c:\Documents and Settings \bjit_234\Desktop\Emglish 20\ETMDi\app\common \ xmllite\xmllite.h(385):错误C2061:语法错误:标识符'__out_ecount_part'
其他错误。
环境:视觉studio 2003,WIndows XP,Service Pack 3.
任何人都可以帮助解决错误发生的原因以及可能的解决方案。
一些找不到的符号 - __in,__ out,_in_opt,__ out_ecount_part - 来自SAL Annotations的
。您使用的是VS 2003,我认为该版本不支持SAL
。我见过它最早用的是VS 2005.
SAL注释
Visual Studio 2005
$
注释概述
Visual Studio 2005
$
了解SAL
Visual Studio 2015
$
- Wayne
I am using xmllite library version 1.0.1018.0
But I am facing following errors when trying to build the code.
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(91): error C2065: '__in' : undeclared identifier
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(91): error C2143: syntax error : missing ')' before 'const'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(91): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(93): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(97): error C3861: '__in': identifier not found, even with argument-dependent lookup
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(97): error C2146: syntax error : missing ')' before identifier 'IUnknown'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(97): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(102): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(104): error C3861: '__in': identifier not found, even with argument-dependent lookup
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(104): error C2146: syntax error : missing ')' before identifier 'IUnknown'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(104): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(109): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(112): error C3861: '__in': identifier not found, even with argument-dependent lookup
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(112): error C2143: syntax error : missing ')' before 'const'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(112): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(114): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(118): error C3861: '__in': identifier not found, even with argument-dependent lookup
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(118): error C2146: syntax error : missing ')' before identifier 'IUnknown'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(118): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(121): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(123): error C3861: '__in': identifier not found, even with argument-dependent lookup
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(123): error C2146: syntax error : missing ')' before identifier 'IUnknown'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(123): warning C4229: anachronism used : modifiers on data are ignored
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(126): error C2059: syntax error : ')'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(319): error C2061: syntax error : identifier '__in_opt'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(323): error C2061: syntax error : identifier '__in'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(329): error C2061: syntax error : identifier '__in'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(335): error C2061: syntax error : identifier '__out_opt'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(339): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(347): error C2061: syntax error : identifier '__in'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(355): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(361): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(367): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(373): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(379): error C2061: syntax error : identifier '__out'
c:\Documents and Settings\bjit_234\Desktop\Emglish 20\ETMDi\app\common\xmllite\xmllite.h(385): error C2061: syntax error : identifier '__out_ecount_part'
Others error.
Environment: Visual studio 2003, WIndows XP, Service pack 3.
Anyone can help why the errors happened and what could be the probable solution.
to be from SAL Annotations. You're using VS 2003 and I don't think SAL was
supported in that release. The earliest I've seen it used is with VS 2005.
SAL Annotations
Visual Studio 2005
https://msdn.microsoft.com/en-us/library/ms235402(VS.80).aspx
Annotation Overview
Visual Studio 2005
https://msdn.microsoft.com/en-us/library/ms182033(v=vs.80).aspx
Understanding SAL
Visual Studio 2015
https://msdn.microsoft.com/en-us/library/hh916383.aspx
- Wayne
这篇关于面对来自xmllite库的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!