User forums > General (but related to Code::Blocks)
Too many error or warning masseges
(1/1)
rittwik:
Hi,
I am using Borland Comand Line Tool 5.5, in WinXp SP2.
While compiling a project Code::Blocks gives one error message
--- Code: ---Error E2228 main.cpp 2118: Too many error or warning messages
*** 1 errors in Compile ***
--- End code ---
There is no error and 99 warnings...
How can I tell Code::Blocks to ignore those warnings and compile the project?
Thanks
Rittwik
thomas:
Code::Blocks does not output things like "E2228", it's your compiler that is giving up.
Write better code, get less warnings.
rittwik:
Thanks Thomas for you reply.
You are right, Borland compiler is stop compiling the project after too many warnings.
Actually I am using GDI+ (of microsoft) in a project where the compiler is Borland 5.5.
So not all the warnings are due to my code. Anyway, I found a "temporary" solution.
For those who may need
if you add "-gn" (without quotes) where n is a number between 0 to 255, in the compiler option
then Borland Compiler will ignore first n messages
Thanks rittwik
El_Zorro:
You could also try using the preprocessor #pragma to disable specific warnings, like this:
--- Code: ---// Disable warning
#pragma warning( disable : 4800 )
// Code here doesn't generate the warning
// Restores warning default setting
#pragma warning( default : 4800 )
--- End code ---
Another option:
--- Code: ---// Save warning state
#pragma warning( push )
#pragma warning( disable : 4834 )
#pragma warning( disable : 4835 )
#pragma warning( disable : 4700 )
// Some code here that avoids those warnings
// Restore saved state
#pragma warning( pop )
--- End code ---
Replace the numbers after "disable" and "default" for the warning numbers that you get when compiling.
rittwik:
Thank you El_Zorro.... That help a lot...
Navigation
[0] Message Index
Go to full version