I am evaluating WPP and am trying to add it to my project. When I
build I get the error:

error C4013: 'WPP_BIT_' undefined; assuming extern returning int

I must have missed a step. I am trying to follow the sample code
osrusbfx2.
I have added this to my sources:
RUN_WPP=$(SOURCES) \
-km \
-func:TraceEvents(LEVEL,FLAGS,MSG,...) \
-gen:{km-WdfDefault.tpl}*.tmh (added this as a test, made no
difference)

I have added this to my header file:
/
*****************************************************************************
WPP Tracing stuff
*****************************************************************************/
#define WPP_CHECK_FOR_NULL_STRING //to prevent exceptions due to NULL
strings
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(EpTraceGuid,(e7cd1840 ,f9bf, 11dc ,95ff ,
0800200c9a66), \
WPP_DEFINE_BIT(ES_ERRORS) /* bit 0 = 0x00000001
*/ \
)
/* You can have up to 32 defines. If you want more than that,\
\
you have to provide another trace control GUID */


#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags)
&& WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)

I include <driver.tmh> after my other header file.
I call it like this:
TraceEvents(TRACE_LEVEL_INFORMATION,
ES_ERRORS,
("This is a test trace message %d\n"),
9);

Any ideas on what is going wrong here ?

Thanks.

Re: WPP: error C4013: 'WPP_BIT_' undefined; assuming extern by tr

tr
Mon Mar 24 12:45:58 CDT 2008

On Mar 24, 9:48 am, tr <tr...@yahoo.com> wrote:
> I am evaluating WPP and am trying to add it to my project. When I
> build I get the error:
>
> error C4013: 'WPP_BIT_' undefined; assuming extern returning int
>
> I must have missed a step. I am trying to follow the sample code
> osrusbfx2.
> I have added this to my sources:
> RUN_WPP=$(SOURCES) \
> -km \
> -func:TraceEvents(LEVEL,FLAGS,MSG,...) \
> -gen:{km-WdfDefault.tpl}*.tmh (added this as a test, made no
> difference)
>
> I have added this to my header file:
> /
> *****************************************************************************
> WPP Tracing stuff
> *****************************************************************************/
> #define WPP_CHECK_FOR_NULL_STRING //to prevent exceptions due to NULL
> strings
> #define WPP_CONTROL_GUIDS \
> WPP_DEFINE_CONTROL_GUID(EpTraceGuid,(e7cd1840 ,f9bf, 11dc ,95ff ,
> 0800200c9a66), \
> WPP_DEFINE_BIT(ES_ERRORS) /* bit 0 = 0x00000001
> */ \
> )
> /* You can have up to 32 defines. If you want more than that,\
> \
> you have to provide another trace control GUID */
>
> #define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
> #define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags)
> && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
>
> I include <driver.tmh> after my other header file.
> I call it like this:
> TraceEvents(TRACE_LEVEL_INFORMATION,
> ES_ERRORS,
> ("This is a test trace message %d\n"),
> 9);
>
> Any ideas on what is going wrong here ?
>
> Thanks.

Ok. The extra set of parentheses in the TraceEvents call was causing
the problem.

It appears that there is no DEBUGHELP.DLL for amd64 on Server 2003
64bit, which means tracepdb.exe won't work on this platform. Can
anyone comfirm ?
Thanks.