这个编译告警有无人见过?(大概是字符串名称太长)
望大侠告知怎么解决?
-----
myFirstAPPDoc.cpp
d:\program files\microsoft visual studio\vc98\include\comip.h(77) : warning C4786: '?_QueryInterface@?$_com_ptr_t@V?$_com_IIID@UIXMLDOMDocument@MSXML2@@$1?_GUID_2933bf81_7b36_11d2_b20e_00c04f983e60@@3U__s_GUID@@A@@@@AAEJABV?$_com_ptr_t@V?$_com_IIID@
UIXMLDOMDocument2@MSXML2@@$1?_GUID_2933bf95_7b36_11d2_b20e_00c04f983e60@@3U__s_GUID@@A@@@@@Z' : identifier was truncated to '255' characters in the browser information
        E:\fhmyFirstAPP\ui\myFirstAPP\myFirstAPPDoc.cpp(2825) : see reference to function template instantiation '__thiscall _com_ptr_t<class _com_IIID<struct MSXML2::IXMLDOMDocument,&struct __s_GUID  _GUID_2933bf81_7b36_11d2_b20e_00c04f983e60> >::_com_ptr_t<class _c
om_IIID<struct MSXML2::IXMLDOMDocument,&struct __s_GUID  _GUID_2933bf81_7b36_11d2_b20e_00c04f983e60> >(const class _com_ptr_t<class _com_IIID<struct MSXML2::IXMLDOMDocument2,&struct __s_GUID  _GUID_2933bf95_7b36_11d2_b20e_00c04f983e60> > &)' being c
ompiled

解决方案 »

  1.   

    Compiler Warning (level 3) C4786
    'identifier' : identifier was truncated to 'number' characters in the debug informationThe identifier string exceeded the maximum allowable length and was truncated.The debugger cannot debug code with symbols longer than 255 characters. In the debugger, you cannot view, evaluate, update, or watch the truncated symbols.This limitation can be overcome by shortening identifier names. The example code below demonstrates this method.A trace mechanism can also be used to solve this problem. A trace mechanism is like the printf statements in the code. It keeps track of what is going on in an application during the debugging process. The _ASSERT, _ASSERTE, _RPTn and _RPTFn macros provide concise and flexible ways to perform the trace. These macros are not defined when _DEBUG is not defined. See Using Macros for Verification and Reporting for more information.This warning is off by default. See Compiler Warnings That Are Off by Default for more information.
      

  2.   

    #pragma warning(disable:4786)
    有什么用,压制了warning不出来而已,况且你也不注意还给编译器
    #pragma warning(default:4786)关键把com类型id字符串改短些呀,<255个字符即可.
      

  3.   

    我不记得什么地方写了255个字符的ID啊。
    “com类型id字符串 ” 在那个类里面?
      

  4.   

    #pragma warning(disable:4786)
    其实不好,你自己就发现不了这种错误了。最好是改变量名。