WPP error - WPP_BIT_XXX : undeclared identifier

Hi there,

I am using WPP. I have defined following in a header file -
#define TRACELEVELONE 1
#define TRACELEVELTWO 2

#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID( MyFriendlyName, (4F03A289, CC06, 4198, B8E7, 91FABB1CB35D), \
WPP_DEFINE_BIT(TRACELEVELONE) \
WPP_DEFINE_BIT(TRACELEVELTWO) )

In SimpleWPP.cpp I have a call

DoTraceMessage(TRACELEVELTWO, “Hello to WPP”);

I am getting following error -
.\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_2’ : undeclared identifier
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have class/struct/union

If I change the call to
DoTraceMessage(TRACELEVELONE, “Hello to WPP”);

Then the error is -
.\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_1’ : undeclared identifier
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have class/struct/union

Does anyone here know what could be the problem? Why is it unable to find WPP_BIT_xxx?

Thanks for looking into this.


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

Remove the following lines from your header and it will work fine.

#define
TRACELEVELONE 1 #define
TRACELEVELTWO 2

On 6/7/06, Sohail Kadiwala wrote:
>
> Hi there,
>
> I am using WPP. I have defined following in a header file -
> #define
> TRACELEVELONE 1 #define
> TRACELEVELTWO 2
> #define
> WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID( MyFriendlyName, (4F03A289,
> CC06, 4198, B8E7, 91FABB1CB35D), <br>> WPP_DEFINE_BIT(TRACELEVELONE) <br>> WPP_DEFINE_BIT(TRACELEVELTWO) )
>
> In SimpleWPP.cpp I have a call
>
> DoTraceMessage(TRACELEVELTWO, “Hello to WPP”);
>
> I am getting following error -
> .\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_2’ : undeclared identifier
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have
> class/struct/union
>
> If I change the call to
> DoTraceMessage(TRACELEVELONE, “Hello to WPP”);
>
> Then the error is -
> .\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_1’ : undeclared identifier
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have
> class/struct/union
> .\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have
> class/struct/union
>
> Does anyone here know what could be the problem? Why is it unable to find
> WPP_BIT_xxx?
>
> Thanks for looking into this.
>
> ------------------------------
> Do you Yahoo!?
> Next-gen email? Have it all with the all-new Yahoo! Mail Beta.http:— Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
></http:>

Thanks Shreshth. It worked.

Shreshth Luthra wrote:
Remove the following lines from your header and it will work fine.

#define
TRACELEVELONE 1 #define
TRACELEVELTWO 2

On 6/7/06, Sohail Kadiwala wrote: Hi there,

I am using WPP. I have defined following in a header file -
#define
TRACELEVELONE 1 #define
TRACELEVELTWO 2
#define
WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID( MyFriendlyName, (4F03A289, CC06, 4198, B8E7, 91FABB1CB35D), <br> WPP_DEFINE_BIT(TRACELEVELONE) <br> WPP_DEFINE_BIT(TRACELEVELTWO) )

In SimpleWPP.cpp I have a call

DoTraceMessage(TRACELEVELTWO, “Hello to WPP”);

I am getting following error -
.\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_2’ : undeclared identifier
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have class/struct/union

If I change the call to
DoTraceMessage(TRACELEVELONE, “Hello to WPP”);

Then the error is -
.\SimpleWPP.cpp(23) : error C2065: ‘WPP_BIT_1’ : undeclared identifier
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Flags’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Control’ must have class/struct/union
.\SimpleWPP.cpp(23) : error C2228: left of ‘.Logger’ must have class/struct/union

Does anyone here know what could be the problem? Why is it unable to find WPP_BIT_xxx?

Thanks for looking into this.

---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com