Question

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?

Was it helpful?

Solution

  • 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top