Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi all,
 
can any one suggest me to disable warning in projectlevel.
 
I am using visual stuido 6.0.
I tried this below code in many files, but not worked.
.
 
#pragma warning( disable : 4786 )
 
visual studio 6.0 is keep on giving warning:c:\program files\microsoft visual studio\vc98\include\map(27) : warning C4786: bla bla bla.....
Posted 30-Nov-11 1:46am
Edited 30-Nov-11 1:47am
v2
Comments
Laxmikant_Yadav at 30-Nov-11 7:11am
   
You have to include #pragma warning( disable : 4786 ) statement in every source file at the beganing.
G Haranadh at 30-Nov-11 7:17am
   
hmm... thanks, i included in stdafx.cpp first line. anyway stdafx.h is included in every file.. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

you can do it using IDE itself.
Go to Project Settings->C/C++ tab->Select "General" from category combo. select lower Level from "warning Level" Combo
  Permalink  
Comments
G Haranadh at 30-Nov-11 7:15am
   
thanks for quick reply. My intention is to resolve this issue in project level and i want other warnings should come in same way..
the solution i used is, i moved the "pragma disable warning" to first line of stdafx.cpp; means before including stdafx.h i added this warning disable statement.
and compiled that warning not came again; for project level. thanks for your response too. thanks.
Albert Holguin at 30-Nov-11 14:17pm
   
if you wanted to do this for the whole project, why didn't you just do it in the stdafx.h (pre-compiled header) in the first place anyway?
G Haranadh at 30-Nov-11 23:40pm
   
yes. thanks alot. i did the same. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I don't think it can be done using the IDE itself. The way we do it is to have a global include file Configure.h that contains stuff that has to be set/defined/declared for every source file. This include file also disables some warnings using pragmas.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 315
1 OriginalGriff 233
2 Aajmot Sk 224
3 Richard MacCutchan 220
4 Marcin Kozub 210
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 30 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100