Compiler warning...how to switch off???

Started by
7 comments, last by Impz0r 22 years, 8 months ago
hi, I''ve trouble with endless compiler warnings. I use the std::map in one of my class, but my class is in his onw namespace, and the map shows like these map, where the cString is my own string class and he is in my onw namespace too. So when i go and compile these class, the compiler give me tons of warnings out, this warning C4786. Ok i''ve test to avoid this warning spamm with : // disable the ffs long name errors... #pragma warning(disable : 4786) but this won''t work for me, he ignores my pragma wtf is going on here??? Pls help Thx Imp bugs are uncommented features...
Stay Evil & Ugly!
Advertisement
This is a known compiler bug. I believe it''s in the MS Knowledge Base. It''s always worked for me, however.
hmmm,

there is nothing to avoid this shit??
I mean when i compile my project, and i get en error back and more then five hundred warnings, believe i''ts not fun to find the error in the compiler output window...sigh

Imp
Stay Evil & Ugly!
Try using shorter type names in your map... using typedefs if necessary. Also try ensuring that the #pragma appears above all your code.
It seems to me that I always have problems when I include STL files in stdafx.h, usually in dynamic builds. Like Kylotan said, this is a known bug. And there''s no way to make your names short enough if you have a map of string or something like that--just those two names & their templates & allocators will shoot past the 255 char limit.
Not sure if this will help, but try putting the #pragam disable at the top of your stdafx.h, or if you don''t have one at the top of your main.cpp.
This is the code that I use. It is in a file that is the first include in my stdafx.h

#pragma warning (disable : 4786)

#include &ltvector>
#include &ltlist>
#include &ltbitset>
#include &ltstring>
#include &ltmap>
using namespace std;

There are no warnings generated with this.

Hope this helps

Lotan

Edited by - Lotan on August 3, 2001 12:42:51 PM
hi,

thx for your replies :D

hmmm, i don''t use the file stdafx.h must i?

Imp
Stay Evil & Ugly!
I would also like to know how to use stdafx.h

This topic is closed to new replies.

Advertisement