#pragma message not displaying
I am sure this a compiler setting I have over looked. But can anyone tell me why my pragma message is not showing up in the build window?
It has been years since I have tried to use this.
Basic code as follows:
Method ()
{
#pragma message ("Reminder here .....")
}
Init called the Method.
Re: #pragma message not displaying
I'm not sure I understood, but pragma message will output text message while you are compiling your source not at run time, and your syntax does look OK.
Re: #pragma message not displaying
From what I remember, "#pragma message ("some text") when compiling, it should display this message in the Build window. Is this correct?
Re: #pragma message not displaying
Quote:
Originally Posted by
rkruis
From what I remember, "#pragma message ("some text") when compiling, it should display this message in the Build window. Is this correct?
Yes, as pointed out in my post.
"pragma message will output text message while you are compiling your source"
Re: #pragma message not displaying
Thanks STLDude.
Any ideas what warning level should be set to, so this appears in my build window? I am sure it is a setting like that, that I have incorrect.
Re: #pragma message not displaying
This pragma message works with all warnings levels 1 to 4, so you should see it in Output window in Visual Studio. http://www.dr-bill.net/CSC076/class_...26/pragmas.htm for some more info.
Re: #pragma message not displaying
This is an old thread, but the problem is new for me...
Just started using VS2012, and I'm having this same problem. The messages to not appear in the build window. Build errors appear, but not messages. I cannot find a switch in the options that might turn the display of these messages on.
Re: #pragma message not displaying
First, please further prefer opening a new thread instead of waking up a (very) old one!
Well, I see two possible causes:
- it is skipped by other preprocessor directives: #if, #ifdef, etc;
- the project uses precompiled headers and you have put #pragma message before including "stdafx.h"; note that, in this case all preprocessor directives are ignored.