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

Controls wont appear in resource.fd

onkelhotte
New Contributor II
731 Views

Hi there,

Im using IVF10 since one year now and last month my other colleagues migrated too. Now one colleague told me, when he edits a dialog, the new control is present in resource.h but not in resource.fd. When he wants to use the control (dlgset ...) it wont compile because it is not listed in resource.fd.

Im working ata project over a year now, edited the dialogs a lot and never experienced such behaviour. So I tested this in another project I working with, where I havent changed the dialog since. To my surprise, in the second project, a new control is not present in resource.fd, but in resource.h. In the first project everything works fine, when I add new controls.

Both projects where originally written in CVF and where migrated to IVF. We are using VS2008 Professional on WindowsXP German.

Thanks in advance,
Markus

0 Kudos
7 Replies
anthonyrichards
New Contributor III
731 Views

It sounds like the resource.fd is not being recreated automatically by your resource compilerin response to changes made to the .RC or .RES files. This happens automatically with CVF. I believe that IVF needs the VC++Resource compiler? Perhaps your VC++ integration has a bug? Have you manually edited the .RC or .RES files at anytime? If so, that is NOT recommended otherwise resource problems result.

You could try deleting the present .FD file and see what happens when you recompile the .RC file.

0 Kudos
onkelhotte
New Contributor II
731 Views

When I delete both resource.fd files, the working project creates a new resource.fd, while compiling. The other wont. Compiling script.rc manually doesnt help.

I compared theResources entries in Project -> Properties and they are identical. I compared both script.rc and they dont have any differences (except the controls of course).

So somehow my project wont create or update the resource.fd, but why?

Markus

0 Kudos
anthonyrichards
New Contributor III
731 Views

I did a Google search using "resource.fd not updated from resource.h" and found this link.

http://software.intel.com/en-us/forums//topic/53748

The bit I think you will find useful is the following (from Jugoslav Djugic, as usual!)

Quote:"As for "resource.fd", it is semi-automatically "translated" from resource.h by Intel-provided tool called deftofd. The "semi-automation" is achieved by a custom build rule on the resource.h property sheet. The build rule is created if you create the project from File/New/Project or if you converted it from CVF project; otherwise, you have to add it manually, for all configurations. The build rule is universal and it reads:

Command line: deftofd "$(InputPath)" "$(InputDir)$(InputName).fd"
Description:  Generating Fortran include file...
Outputs:      $(InputDir)$(InputName).fd

It possibly got lost during your cleanup attempts; basically, you don't need the backup of resource.fd. " Unquote

0 Kudos
Steven_L_Intel1
Employee
731 Views
Your project needs to have a step that runs deftofd to create the resource.fd. Usually this happens automatically when you add a resource file, but I have seen cases where it gets lost. Here's how to restore it (this is from the documentation discussing adding a resource file to a project):
  1. Add Resource.h to your project using File>Add Existing Item...
  2. Select the Resource.h file in the Solution View and the select View>Property Pages from the main menu bar.
  3. Set the Command Line option to use the deftofd tool by entering:
    deftofd resource.h resource.fd

    (For more information on the deftofd tool, see The Include (.FD and .H) Files.)
  4. Set the Description option to Generating Fortran include file...
  5. Set the Outputs option to resource.fd.
  6. Click OK.


0 Kudos
onkelhotte
New Contributor II
731 Views

Thanks for the link, now it works!

Markus

0 Kudos
aletio
Beginner
731 Views
Hello Steve,

I had followed these 6 steps you wrote, but got no result.
A file "resource.fd" was not created from "resource.h".

Any sugestion how to fix it?

Is there any other way to create an *.fd file from *.h file?
0 Kudos
Steven_L_Intel1
Employee
731 Views
See the other thread where you asked this.
0 Kudos
Reply