Thread: map warnings and microsoft visual C++ 6.0

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    265

    map warnings and microsoft visual C++ 6.0

    Ok, whenever i do any projects involving maps or multimaps, i get this type of crap:

    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_trait s<char>,std::allocator<char> >,std:air<std::basic_string<char,std::char_traits<char>, std::allocator<char> > cons
    t ,void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)>,std::map<std::basic_string<char,std::char_trai ts<char>,std::allocator<char> >,void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char
    > >),std::less<std::basic_string<char,std::char_trai ts<char>,std::allocator<char> > >,std::allocator<void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)> >::_Kfn,std::less<std::basic_string<char,std::char _traits<cha
    r>,std::allocator<char> > >,std::allocator<void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)> >::_Redbl' : identifier was truncated to '255' characters in the debug information
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,st d::allocator<char> >,std::less<std::b
    asic_string<char,std::char_traits<char>,std::alloc ator<char> > >,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,st d::allocator<char> >,std::less<std::b
    asic_string<char,std::char_traits<char>,std::alloc ator<char> > >,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char> > > >::value_compare' : identifier was truncated to '255' characters in the debug information
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,st d::allocator<char> >,std::less<std::b
    asic_string<char,std::char_traits<char>,std::alloc ator<char> > >,std::allocator<std::basic_string<char,std::char_ traits<char>,std::allocator<char> > > >::_Kfn' : identifier was truncated to '255' characters in the debug information
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)
    ,std::less<std::basic_string<char,std::char_traits <char>,std::allocator<char> > >,std::allocator<void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)> >' : identifier was truncated to '255' characters in the debug in
    formation
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)
    ,std::less<std::basic_string<char,std::char_traits <char>,std::allocator<char> > >,std::allocator<void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)> >::value_compare' : identifier was truncated to '255' characters
    in the debug information
    c:\program files\microsoft visual studio\vc98\include\streambuf(87) : warning C4786: 'std::map<std::basic_string<char,std::char_traits< char>,std::allocator<char> >,void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)
    ,std::less<std::basic_string<char,std::char_traits <char>,std::allocator<char> > >,std::allocator<void (__cdecl*)(std::basic_string<char,std::char_traits <char>,std::allocator<char> >)> >::_Kfn' : identifier was truncated to '255' characters in the de
    bug information
    Linking...


    .exe - 0 error(s), 150 warning(s)

    Now my question is this: Other than telling it NOT to give me warnings ( i like warnings, i really do.) how do i tell it not to warn me about this particular one. it truncated debugging info to 255 characters or whatever. I believe it has to do with msfts implimentation of the stl code (i believe msft did a poor job of it in some cases) But im looking for suggestions of a line i cna put in my code. like a compiler directive so people dont have to change a bunch of project settings to get a clean compile. #progrma some_thing_to_tell_msft_to_stfu..

    thanks for all the help guys, your great.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    #pragma warning( disable: 4786 )
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Why not try a search

  4. #4
    Registered User
    Join Date
    Feb 2003
    Posts
    265
    tried that,
    exe - 0 error(s), 171 warning(s)

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by DeepBlackMagic
    tried that,
    exe - 0 error(s), 171 warning(s)
    Read the post I gave...read it through including Eibro's comment

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    265
    i fixed it. if you stick the #prgrma BEFORE your inclusions, it negates it for all included files. thx guys.

  7. #7
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    This is FAQ material. Yay or nay?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. Linker problem in MicroSoft Visual C++
    By Christer in forum C++ Programming
    Replies: 3
    Last Post: 12-10-2002, 01:08 PM
  5. Microsoft Visual C++ compiler, cast problem?
    By jonnie75 in forum C Programming
    Replies: 5
    Last Post: 11-10-2001, 08:53 AM