04-21-2010 01:20 PM
I have a string resource that needs to be different across OS levels. Here are the ways I have thought to do it:
None of these is very attractive. The first runs contrary to the basic strategy I've followed of using the preprocessor to maintain a single code base. The other two will mean that the .cod file for each OS version will have the resource definitions for all versions, which seems like a waste.
Is there any other approach?
04-22-2010 05:35 PM
Good question. I'd like to know this as well. I have resources that are only necessary on certain OS builds but I'm not so familiar with ant tools so I haven't found a way to exclude them short of manually doing so.
That hasn't worked out so well either. I'd rather something automatic.
04-22-2010 06:00 PM
Yeah, it would be very nice if there was a way to use the preprocessor (or some other tool) to include or exclude compilation units based on preprocessor directives.
How do you exclude resources manually?
04-22-2010 06:21 PM
In Eclipse, I right-click project Build Path > Configure Build Path.
Under Source, I set up Exclusion patterns to not compile in resources or source code based on names or just by browsing to the files I don't want in the compilation.