By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,677 Members | 1,882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,677 IT Pros & Developers. It's quick & easy.

How to disable warning C4786 in VC++ 6.0?

P: n/a
This debugger-related warning is flooding my output window. Example:

c:\program files\microsoft visual studio\vc98\include\xmemory(38) : 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_trait s<char>,std::allocator<char
const
,TextureRecord>,std::map<std::basic_string<char,st d::char_traits<char>,std::allocator<char>
>,TextureRecord,std::less<std::basic_string<char,s td::char_traits<char>,std::allocator<char>
> >,std::allocator<TextureRecord> >::_Kfn,std::less<st
d::basic_string<char,std::char_traits<char>,std::a llocator<char> >,std::allocator<TextureRecord>
::const_iterator,std::_Tree<std::basic_string<cha r,std::char_traits<char>,std::allocator<char>
,std::pair<std::basic_string<char,std::char_trait s<ch ar>,std::allocator<char> > const
,TextureRecord>,std::map<std::basic_string<char,st d::char_traits<char>,std::allocator<char>,TextureRecord,std::less<std::basic_string<char,s td::char_traits<char>,std::allocator<char>
,std::allocator<TextureRecor
d>::_Kfn,std::less<std::basic_string<char,std::char _traits<char>,std::allocator<char>
,std::allocator<TextureRecord> >::const_iterator>' : identifier was

truncated to '255' characters in the debug information

What options can I set to disable this warning? Any help is appreciated.

Jason.
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Jason Heyes wrote:

This debugger-related warning is flooding my output window. Example:

c:\program files\microsoft visual studio\vc98\include\xmemory(38) : 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_trait s<char>,std::allocator<char
const
,TextureRecord>,std::map<std::basic_string<char,st d::char_traits<char>,std::allocator<char>
>,TextureRecord,std::less<std::basic_string<char,s td::char_traits<char>,std::allocator<char>
> >,std::allocator<TextureRecord> >::_Kfn,std::less<st

d::basic_string<char,std::char_traits<char>,std::a llocator<char> >
>,std::allocator<TextureRecord>
>::const_iterator,std::_Tree<std::basic_string<cha r,std::char_traits<char>,std::allocator<char>
>,std::pair<std::basic_string<char,std::char_trait s<ch

ar>,std::allocator<char> > const
,TextureRecord>,std::map<std::basic_string<char,st d::char_traits<char>,std::allocator<char>
>,TextureRecord,std::less<std::basic_string<char,s td::char_traits<char>,std::allocator<char>
> >,std::allocator<TextureRecor

d>
>::_Kfn,std::less<std::basic_string<char,std::char _traits<char>,std::allocator<char>
> >,std::allocator<TextureRecord> >::const_iterator>' : identifier was

truncated to '255' characters in the debug information

What options can I set to disable this warning? Any help is appreciated.


While this question is off topic in this group
(in the future please direct questions about how to operate
your compiler to a group dedicated to your compiler)

insert
#pragma warning (disable : 4786)
as the very first line (before all the includes) of your code

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 23 '05 #2

P: n/a
"Karl Heinz Buchegger" <kb******@gascad.at> wrote in message
news:42***************@gascad.at...

While this question is off topic in this group
(in the future please direct questions about how to operate
your compiler to a group dedicated to your compiler)

insert
#pragma warning (disable : 4786)
as the very first line (before all the includes) of your code


I have alot of source files and to insert each #pragma by hand would be
time-consuming. What do you suggest I do? Will I need to find a separate
tool to automate the process? Thanks.
Jul 23 '05 #3

P: n/a
>> While this question is off topic in this group
(in the future please direct questions about how to
operate your compiler to a group dedicated to your
compiler)

insert
#pragma warning (disable : 4786)
as the very first line (before all the includes) of your
code


I have alot of source files and to insert each #pragma by
hand would be time-consuming. What do you suggest I do?
Will I need to find a separate tool to automate the
process? Thanks.

Check out

http://www.bdsoft.com/tools/stlfilt.html
STLFilt simplifies and/or reformats long-winded C++ error and warning messages,
with a focus on STL-related diagnostics (and for MSVC 6, it fully eliminates
C4786 warnings and their detritus).
Jul 23 '05 #4

P: n/a
If you are using VC projects I am assmuing you must be using
precompiled headers as well.

Put the pragma warning in the pch header for all projects

Raj

Jul 23 '05 #5

P: n/a
On Thu, 3 Mar 2005 21:59:05 +1100 in comp.lang.c++, "Jason Heyes"
<ja********@optusnet.com.au> wrote,
What options can I set to disable this warning? Any help is appreciated.


See:
http://groups.google.com/groups?as_q...arning%20C4786

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.