Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"
like image 507
Eric Avatar asked Dec 13 '11 00:12

Eric


People also ask

What is a word for disable?

Some common synonyms of disable are cripple, debilitate, enfeeble, sap, undermine, and weaken. While all these words mean "to lose or cause to lose strength or vigor," disable suggests bringing about impairment or limitation in a physical or mental ability. disabled by an injury sustained at work.

Does disable mean turn off?

To disable is defined as to make something not work that was working before, or to injure someone in a way that makes them unable to do something. An example of disable is to stop a car from running by disconnecting the battery cables.

What are disabled mean?

Medical Definition of disabled 1 : impaired or limited by a physical, mental, cognitive, or developmental condition : affected by disability. 2 : incapacitated by illness, injury, or wounds. disabled. adjective.

What is enable vs disable?

Enable vs Disable - What's the difference? | WikiDiff. https://wikidiff.com/enable/disable. is that enable is to give strength or ability to; to make firm and strong while disable is to render unable; to take away an ability of. As an adjective disable ...


1 Answers

Just define a macro that makes the message pragma disappear.

#define message(ignore)
like image 119
Raymond Chen Avatar answered Sep 27 '22 18:09

Raymond Chen