How to configure WPP to instrument code in header files (such as templates)?

306 Views Asked by At

My driver project uses several template classes which are implemented in c++ header files.

By default WPP runs only on .c and .cpp source files, and does not process .h files at all.

I have followed the instructions in How do I generate trace messages from a header file? from MSDN, however the .h files are still not being processed by WPP.

1

There are 1 best solutions below

0
On

The MSDN documentation omits an important additional step - WPP is not called for "h" files, therefore you have to direct it manually by adding

\\path\\to\\header\\header.h

to the WPP command line.

(or add \\path\\to\\header\\*.h to process multiple files)

You can configure visual studio to do this for you like so:

enter image description here