Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29298 Discussions

Constant Recompiles with Resource File

Michael8
Beginner
720 Views

Hello:

I thought these problems were all fixed for quite some time, but now I'm running into it again. I have a program that IVF (11.1.038) thinks is always out of date. So whenever I try to run it, it always prompts me to first recompile.

I've narrowed it down to a reproducable test program. It looks like this is happening whenever my resource files (resource.rc, resource.h, and the generated resource.fd) are not in the same directory as my project.

The attached zip file, ResDiffDir.zip, demonstrates this problem. Note that I have also created a simple test case, attached as ResDiffDir2.zip, which has the resource files in the same directory as the project, and things work fine.

Thanks.
Michael

0 Kudos
6 Replies
Steven_L_Intel1
Employee
720 Views
Thanks - we'll take a look.
0 Kudos
Steven_L_Intel1
Employee
720 Views
I can reproduce this - thanks. Reported as issue DPD200149716.
0 Kudos
Michael8
Beginner
720 Views

Thanks for filing the report. So here's my naive question: How do I use that issue number you posted to follow the progress on this?

Thanks.
Michael

0 Kudos
Steven_L_Intel1
Employee
720 Views
Just follow this thread (you can subscribe to it.) When there are updates I'll post here. The ID is our internal tracking number and not usable directly by you.
0 Kudos
Steven_L_Intel1
Employee
720 Views

This turns out to be a problem you introduced into the project, though I understand it is easy to overlook.

One of the needed steps when you add a resource file to a Fortran project is to add a "Custom Build Step" that invokes deftofd on the resource.h file generating resource.fd. You did this, and even added subdir\ to the command line running deftofd. But you forgot to also add subdir\ to the "Outputs" line, which is used by the build dependency analyzer.

So what happened was that the program built correctly, but Visual Studio did not find resource.fd in the project directory and it complained when you went to run the program.

The fix is to right click on resource.h, select Properties, Custom Build Step, General. Change "Outputs" to "SubDir\resource.fd" (without the quotes) and click Ok.

Let me know if this works for you.

0 Kudos
Michael8
Beginner
720 Views

Aha! I knew that the "Outputs" line needed to be filled in, but I always assumed that was just to keep Visual Studio happy, since, in the case of using the deftofd tool, the output name is specified in the "Command Line" setting. I had no idea that the "Outputs" line was actually being used for something (i.e., by the dependency analyzer).

I gave it a try and it did indeed work!

Thanks. Much appreciated.
Michael

0 Kudos
Reply