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

Editing .rc does not update .h or .fd files

Neels
New Contributor II
1,005 Views

I suddenly have this issue in a QuickWin program. Adding for instance a button to a dialog and compiling does not find any record in the resource.h or resource.fd files and I have to manually add them. And the next time I open the .rc file it finds an error and I have to open it with a text editor. It then included a file "resource" without the .h. Adding the .h and saving allows it to be opened again.

Anyone has any idea what I can look at?

0 Kudos
8 Replies
andrew_4619
Honored Contributor II
1,005 Views

The resource editor should update the .h file. How are you changing the rc file? 

0 Kudos
Neels
New Contributor II
1,005 Views

Using the default resource editor in Visual Studio Professional 2012, Update 5

0 Kudos
andrew_4619
Honored Contributor II
1,005 Views

open the rc file in a text editor and check the .h files is not pathed to somewhere you are not looking, other than that is sounds broken!

You could try creating a new (empty) file in the resource editor and copy-pasting your resources into it to see if that behaves in a better way maybe?

 

 

0 Kudos
Steven_L_Intel1
Employee
1,005 Views

It may be that your project is not set up to run deftofd. See the topic "Designing a Dialog Box Overview" in https://software.intel.com/en-us/compiler_winapp_f  Today, the direct link for the topic is https://software.intel.com/en-us/node/535386 but this may change in the future.

0 Kudos
Neels
New Contributor II
1,005 Views

Thanks Steve, I have got those pages as a link on my desktop.

When adding a resource with the resource editor in VS 2012 I have to save it and close it, then open it in an external editor that shows the hidden characters and fix the errors:

After this I have to open the resource and resource.h files and update the one using the other one.

Next, I have to update the resource.fd file after which I can compile the program and all works fine.

This does not happen in a number of other projects.

0 Kudos
Steven_L_Intel1
Employee
1,005 Views

That's very strange - I have not seen other reports of this. So the VS resource editor is corrupting the .rc file? And it's only this one project? What happens if you recreate the project and edit the resource there?

0 Kudos
Neels
New Contributor II
1,005 Views

Steve Lionel (Intel) wrote:

 What happens if you recreate the project and edit the resource there?

I have been trying to avoid that - a few hundred files in different folders but will give a go. Andrew also suggested it.

0 Kudos
andrew_4619
Honored Contributor II
1,005 Views

Why not just remove the rc h fd file from the project and put them somewhere else safe where the project can't see them and then create a new rc in the project. You can open the old rc file and copy past items eg whole dialogs from the old rc file so it will only take 5 minutes to test.out......

0 Kudos
Reply