News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Too many error or warning masseges

Started by rittwik, July 29, 2008, 07:43:38 AM

Previous topic - Next topic

rittwik

Hi,

I am using Borland Comand Line Tool 5.5, in WinXp SP2.
While compiling a project Code::Blocks gives one error message


Error E2228 main.cpp 2118: Too many error or warning messages
*** 1 errors in Compile ***


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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

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:

// Disable warning
#pragma warning( disable : 4800 )

// Code here doesn't generate the warning

// Restores warning default setting
#pragma warning( default : 4800 )


Another option:

// 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 )


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