Eric
Eric

Reputation: 11662

disable #pragma message("...") in Visual C++?

I am consuming a header file that's peppered with annoying messages like:

// annoying.h:

#pragma message("Compiling " __FILE__ )

I would prefer a clean build output when there are no actual problems. Is there anything I can do before I include this file to stop the messages from being printed?

// not_annoying.cpp:

// PUT MAGIC HERE
#include "annoying.h"

Upvotes: 9

Views: 2566

Answers (1)

Raymond Chen
Raymond Chen

Reputation: 45173

Just define a macro that makes the message pragma disappear.

#define message(ignore)

Upvotes: 7

Related Questions