|A post to help other people encountering the same programming annoyance I just had today. Here's some keywords I was searching for: Visual C++ resource compiler RCDATA dependencies.|
The problem: if you have data files in a resource file - eg.
ID_BANANAPICTURE RCDATA "banana.jpg"... then the resource compiler doesn't recognize "banana.jpg" as a dependency. If you update banana.jpg and rebuild, your program will continue to use the old banana.jpg until you manually rebuild the resources, or change the resource file. With a jpg this probably isn't too annoying, but if you have some sort of complicated binary data structure that's generated by another program that you expect to be loaded in a specific way, it can be a huge pain in the arse that takes you three hours to figure out at what stage it went wrong. Not that I'm bitter.
The solution: swearing at the compiler! Add something like this:
#ifdef FUCK_YOU_COMPILER_I_JUST_WANT_THESE_TO_BE_DEPENDENCIESThe part of the resource compiler that figures out dependencies will be fooled by this into thinking banana.jpg is a dependency (er, which it is, so it's not really fooled, but you could fool it into thinking other things are dependencies too), while the part that does the actual compiling will ignore it. Annoying problem that shouldn't exist solved in an annoying way that creates unnecessary work for you! Hooray! [00:18] [0 comments]