Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Resource compiler and configuration

netphilou31
New Contributor III
821 Views
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.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
821 Views
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.
0 Kudos
netphilou31
New Contributor III
821 Views
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.
0 Kudos
Steven_L_Intel1
Employee
821 Views
The resource compiler is a Microsoft tool - Visual Studio does not, on its own, pass predefined identifiers to the RC step.
0 Kudos
Reply