本文介绍了标准 Microsoft 文件“iosfwd"中的语法错误&“atlconv.h"在编译 VS2008 解决方案时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在标准 microsoft 文件iosfwd"中遇到了很多语法错误 &atlconv.h".(我在下面粘贴了一些错误):: 真的不明白标准文件 iosfwd & atlconv.h 中此类错误背后的原因.非常感谢任何帮助.

Hi I am getting so many syntax errors in the standard microsoft file "iosfwd" & atlconv.h". (I have pasted some errors below):: Really dont understand the reason behind such errors in standard file iosfwd & atlconv.h . Any help is greatly appreciated.

IOSFWD 中的错误

ERRORS in IOSFWD

\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(350) : error C2065: '_Size_in_words' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(350) : error C2065: '_First2' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(350) : error C2065: '_Count' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(350) : error C3861: '_CRT_SECURE_WMEMCPY': identifier not found
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(351) : error C2065: '_First1' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(358) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(358) : error C2146: syntax error : missing ')' before identifier '_Elem'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(358) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(358) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(366) : error C2065: '_First1' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(366) : error C2065: '_Count' : undeclared identifier

atlconv.h 中的错误::

ERRORS in atlconv.h::

program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2146: syntax error : missing ')' before identifier 'LPDEVMODEA'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : warning C4229: anachronism used : modifiers on data are ignored
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2495: 'AtlDevModeW2A' : '__declspec(nothrow)' can only be applied to function declarations or definitions
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2143: syntax error : missing ';' before '__stdcall'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C3861: '_Out_z_cap_': identifier not found
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2146: syntax error : missing ')' before identifier 'LPWSTR'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : warning C4229: anachronism used : modifiers on data are ignored
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(536) : error C2143: syntax error : missing ';' before '{'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2143: syntax error : missing ';' before '__stdcall'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C3861: '_Out_z_cap_': identifier not found
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2146: syntax error : missing ')' before identifier 'LPSTR'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : warning C4229: anachronism used : modifiers on data are ignored
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(555) : error C2143: syntax error : missing ';' before '{'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2143: syntax error : missing ';' before '__stdcall'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2065: 'nChars' : undeclared identifier
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C3861: '_Out_z_cap_': identifier not found
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2146: syntax error : missing ')' before identifier 'LPWSTR'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : warning C4229: anachronism used : modifiers on data are ignored
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2374: 'AtlA2WHelper' : redefinition; multiple initialization

这些只是我在这里粘贴的一些错误,因为我无法粘贴所有错误.但所有错误都只在这 2 个文件中(IOSFWD & atlconv.h").

These are just a few errors I have pasted here, as I cant paste every error. But all errors are in these 2 files ONLy (IOSFWD & atlconv.h").

推荐答案

您通常可以假设编译器附带的头文件是正确的,尤其是当它像 .但是,编译器有时会在包含标准头文件之前出现错误时报告标准头文件中的错误.例如,一个未封闭的命名空间或类,即缺少 } 可以产生这种效果(这就是我在你的情况下开始寻找的)或类定义后缺少分号.

You can generally assume that the headers shipping with the compiler are correct, especially, when it is a frequently used one like <iosfwd>. However, compilers sometimes report errors in standard headers when there was an error prior to including them. For example, an unclosed namespace or class, i.e., a missing } can have this effect (this is what I would start looking for in your case) or a missing semicolon after a class definition.

这篇关于标准 Microsoft 文件“iosfwd"中的语法错误&amp;“atlconv.h"在编译 VS2008 解决方案时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 09:50