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

Resource script compilation / dependencies

netphilou31
New Contributor III
3,050 Views

Hi,

I am using Intel Visual Fortran Composer XE version 2011.12.369 along with VisualStudio 2010 shell.

I have projects that include resources scripts containing particular types of resources (in fact binary files identified with the RT_FILE ID). My problem is that when the files are changed, the resource file (.res) is not updated (i.e. the resource script is not compiled to take into account of the update of the included resources). I am sure that this is working properly with the former compiler COMPAQ Visual Fortran (because I am still using CVF projects including such resources types) and I guess that this shall be working with the full version of VisualStudio but why this is not working with the shell ? Is there any workaround to solve this, should I use an external resource compiler and is Yes how to replace the default resource compiler ?

I have tried to force the resource compiler to be invoked by deleting the res file in a PreBuild command by this does not seems to work.

Any Idea ?

Best regards,

0 Kudos
24 Replies
Steven_L_Intel1
Employee
539 Views

Sorry for not getting back to you on this before.

I am missing the .vbs file used in the pre-build step. But in general you probably want to use a Custom Build Step on CopyrightDate.h (I think) that specifies inputs and outputs for the .BIN file rather than a pre-build step, as the latter doesn't factor in to dependency analysis.

0 Kudos
netphilou31
New Contributor III
539 Views

Thanks Steve,

Sorry for missing to include the vbs script. This script does nothing related to the BIN file. It simply creates/updates the CopyRightDate.h file with the value of the current year. The CopyRightDate.h is included in the resources script in order to have the correct LegalCopyright field of the VERSION_INFO bloc. The CopyRightDate.h is not included in the project because it is automatically generated if it does not exist. For this reason it is created/updated using a Pre-Build step but if you think that it would be better to use a custom build for it I will have to add it in the project. You can try with the attached file (which must be placed in the same directory as the resource script) and remove the pre-build step of the project to see if you can reproduce the problem.

Best regards,

Phil.

 

0 Kudos
netphilou31
New Contributor III
539 Views

Dear Steve,

Sorry again, because I did not remember that the CopyRightDate.h was already included in the project. So, if you remove the Pre-Build commands, this should produce the same behavior, i.e. removing the .BIN file after a successful build is correctly identified when the next build is tried, and the .BIN file is being created again but the resource script is not being recompiled as it should be.

Best regards,

Phil.

0 Kudos
netphilou31
New Contributor III
539 Views

Hi Steve,

No news about the problem ?

Best regards,

0 Kudos
Reply