- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is it possible to identify, in a resource script file, which configuration is currently being built (Win32, x64,...) ?
Is there an internal variable or constant that can be used for this purpose ?
I would like to use different resources depending on the configuration.
Thanks,
Phil.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use typical C-style conditional compilation directives, such as #ifdef, in a resource script. It doesn't appear that VS adds any /d options to the rc command line for configuration name, but you can right click on the resource file in the project, select Properties, and add a predefined macro name of your own. This is per-configuration, so you can have DEBUG in one and RELEASE in the other. Then you cn use #ifdef to control things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi steve,
Thanks for the information.
I have tried and it works well. However I would like to know if the compiler creates internal variables that could be directly used inside the resource script to avoid the need to manually add them in the build settings of the .rc file (mainly to identify the target plaftorm Win32 or x64).
Best regards,
Phil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The resource compiler is a Microsoft tool - Visual Studio does not, on its own, pass predefined identifiers to the RC step.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page