PDA

View Full Version : How to clear warnings because of using afxdb.h



selvanathan
May 19, 2007, 12:42:44
Dear sir,
in VC++ (SDI) i am transfering running image using buffer(i.e. with the help of DShowLib), also i am usng database in the same project, so write following code in StdAfx.h

/************************************************** **/
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
/************************************************** **/

because of above lines i get following 6 warnings

warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::vector<_GUID,std::allocator<_GUID> > >,std::map<std::basic_str
ing<char,std::char_traits<char>,std::allocator<char> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::_Kfn,std:
:less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::iterator' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::_Tree<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >,std::pair<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> > const ,std::ve
ctor<_GUID,std::allocator<_GUID> > >,std::map<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<unsigned short,std::char_traits<un
signed short>,std::allocator<unsigned short> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::_Kfn,std::less<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> > >,std::allocator<std::ve
ctor<_GUID,std::allocator<_GUID> > > >::iterator' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,std::vector<_GUID,std::allocator<_GUID> > >,std::map<std:
:basic_string<char,std::char_traits<char>,std::allocator<char> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >:
:_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::iterator,bool>' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::pair<std::_Tree<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >,std::pair<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> > cons
t ,std::vector<_GUID,std::allocator<_GUID> > >,std::map<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<unsigned short,std::char
_traits<unsigned short>,std::allocator<unsigned short> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::_Kfn,std::less<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> > >,std::allocat
or<std::vector<_GUID,std::allocator<_GUID> > > >::iterator,bool>' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::vector<_GUID
,std::allocator<_GUID> > > >::_Kfn' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::map<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >,std::vector<_GUID,std::allocator<_GUID> >,std::less<std::basic_string<unsigned short,std::char_traits<unsigned short>,std::al
locator<unsigned short> > >,std::allocator<std::vector<_GUID,std::allocator<_GUID> > > >::_Kfn' : identifier was truncated to '255' characters in the debug information
Linking...
Creating browse info file...

Sample.exe - 0 error(s), 6 warning(s)


plz help me...

thanks in advance

Stefan Geissler
May 21, 2007, 15:13:52
Hi,

You can get rid of this warnings by adding this pragma into your stdafx.h:


#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information, can be ignored
#pragma warning ( disable : 4995 ) // depericated