views:

113

answers:

1

I am working on a VC++ project under VS2008. My resource files contain some pre-processor directives for conditional compilation. Some of the symbols controlling the conditional compilation are defined in stdafx.h. I need these symbols to be visible to the resource compiler as well. How do I make this happen?

+1  A: 
  • Right-click the resource file in the resource view
  • Select Resource Includes... from the context menu
  • Insert #include "headerfile.h"

However, I think you should not include stdafx from there, but extract the symbols to a seperate header, so that the resouce compiler is not confused with whatever else you might have in stdafx.

Timbo