Advertisement

Correct location of #pragma warning(disable:4786)

Started by March 29, 2001 04:39 AM
3 comments, last by gimp 23 years, 10 months ago
std::map is filling my build window with rubbish messages I don''t care about. I tried using this pragma but it didn''t seem to work. The #include is in a header and the warning seems to occur in other modules that compile. I have tried placing the pragma''s on both ised of this inclue, top\bottom of the file... nothing seems to work. Could anyone make a suggestion? Alternatively is there a compiler scope way of specifing this, I never want to hear about this warning anywhere in the project. Many thanks Chris
Chris Brodie
As far as I remember, I put it in top of the header file (before #include <map> ) that included map, and that worked for all files that included that header as well. But I remember having problems if I used #pragma warning(once:4786) instead.


Edited by - amag on March 29, 2001 9:58:37 AM

Edited by - amag on March 29, 2001 9:59:01 AM
Advertisement
We use STL extensively in our projects. It seems that in small projects, we''re able to use the pragma disable effectively. However, as the project grows (esp. in our libraries), somehow some condition sneaks in that "ignores" the pragma, and if we do a full rebuild we get all those lovely errors. We''ve put the pragma everywhere to no avail. If anybody knows the definitive answer, I''d like to hear it.
Have you tried looking at STL Port? (http://www.stlport.org, but the server seems to be done at the moment.)

It''s a free replacement for the VC++ STL, compiles cleanly. I use it in my projects.
quote:
Original post by mhkrause
It''s a free replacement for the VC++ STL, compiles cleanly. I use it in my projects.


Not at warning level 4.

This topic is closed to new replies.

Advertisement