Archived

This topic is now archived and is closed to further replies.

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

This topic is 5976 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 <vector>
#include <list>
#include <bitset>
#include <string>
#include <map>
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I would also like to know how to use stdafx.h

Share this post


Link to post
Share on other sites