Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
58 Views

Fatal error RC1015: cannot open include file 'winres.h'

Jump to solution

I wonder if anyone can help me please?

I am porting an existing Fortran project from Intel Fortran 11 running on Windows XP to Intel Fortran 18 running on Windows 10.

I am using Microsoft Visual Studio 2017 Community Edition to host the Intel Fortran 18 compiler.

When I build my project, I get the following error:

Fatal error RC1015: cannot open include file 'winres.h'

The articles on the Internet that I have found about this error do not provide me with a workable solution.

Does anyone know how I can fix this error?

Many thanks

Andrew Bond

0 Kudos

Accepted Solutions
Highlighted
58 Views

Steve

Just reporting back to say the problem with my RC file has now been solved. Intel support pointed me to the solution that YOU posted at the bottom of the page here:

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/674904

The problem was caused by the .RC extension being associated with Embarcadero's RADStudio when Visual Studio was installed.

Thanks for your help, both directly and indirectly!

Andrew

View solution in original post

0 Kudos
8 Replies
Highlighted
Black Belt
58 Views

I remember running into this

Jump to solution

I remember running into this problem, and it was very puzzling. winres.h ought to be picked up from one of the Windows SDK paths under "Include files", but I had a system where it stubbornly refused to do so. What I ended up doing was finding the folder containing this file (for example, C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\) and putting that in under Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers > Include Files.

The problem is that the tool complaining is the Microsoft Resource Compiler and Intel has no control over what it does.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
58 Views

Steve

Thanks for your response.

The latest version of the Windows SDK on my machine is v 10.0.17134.0 and I have located winres.h under the folder 'um' in that location (as you indicated). However, adding the path "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um" to:

Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers > Includes

does not fix the problem

Under that setting I notice the entry $(WindowsSdkDir)include\um

and under Macros I see that $(WindowsSdkDir) expands to:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\\PlatformSDK

However, there is no such folder 'Platform SDK' at that location.

Do you know how I can change the value of the macro $(WindowsSdkDir)? I presume that, it I set it to "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0" things might work out ...???

Thanks in advance.

Andrew

0 Kudos
Highlighted
Black Belt
58 Views

Visual Studio creates that

Jump to solution

Visual Studio creates that macro from a registry entry. You might try installing the latest Windows 10 SDK from Microsoft and see if that helps. I admit that this issue baffled me, and then it went away mysteriously on the system where I saw it.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
58 Views

I cannot resolve this problem

Jump to solution

I cannot resolve this problem, despite having uninstalled and then reinstalled both Visual Studio and Intel Fortran. I have tried both with the version of Visual Studio that comes with Intel Fortran XE 2018 (i.e. VS2015 Shell, v14.0.23107.0) and with the latest Community Edition (VS 2017, v15.x).

With VS 2015, when I open the RC file I get a message "The Visual Studio Binary Editor Package" did not load correctly. The ActivityLog.xml file gives the following error message:

No InprocServer32 registered for package [Visual Studio Binary Editor Package]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcpackages\bined.dll

Restarting VS does NOT resolve the problem.

Conclusion: Intel Fortran's integration with the default Visual Studio is broken - product is not usable out of the box.

I then installed Visual Studio 2015 Community Edition itself (using Microsoft's stand-alone installer) and - presto - I can now edit my RC file within VS2015. However, the RC file does not compile and link - hence there are resources added to my application and it crashed on running.

Conclusion: Again, this appears to be an Intel problem - I can get Visual C++ apps to work without a problem.

Having ported this app from a Windows XE box running Intel Fortran 11 under Visual Studio 2008, I am dismayed at how bad the experience has been.

With VS 2017 Community Edition, I am now in the same position - the Fortran toolchain does NOT trigger the resource compiler. No warning or error message - it just ignores the RC file that is included in the project. And when the RC file is selected, the Build menu does NOT display a Compile option.

Help!

 

 

 

 

 

0 Kudos
Highlighted
Black Belt
58 Views

Your situation is unusual,

Jump to solution

Your situation is unusual, but not unheard of. Unfortunately, the integration has many "moving parts" and occasionally things go wrong.

I've never seen a message about a "binary editor package". Did you make sure that the C++ tools were installed as described here (VS2015) or here (VS2017)?

That a .rc file doesn't get compiled I have seen when the file association for the .rc file type is damaged. Sometimes doing a "repair" on the VS install fixes that.

If you can't resolve this, then I recommend opening a support ticket at https://supporttickets.intel.com/?lang=en-US to allow Intel engineering to provide detailed assistance.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
59 Views

Steve

Just reporting back to say the problem with my RC file has now been solved. Intel support pointed me to the solution that YOU posted at the bottom of the page here:

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/674904

The problem was caused by the .RC extension being associated with Embarcadero's RADStudio when Visual Studio was installed.

Thanks for your help, both directly and indirectly!

Andrew

View solution in original post

0 Kudos
Highlighted
Black Belt
58 Views

Hooray!

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
58 Views

I have VS 2017 with Parallel

Jump to solution

I have VS 2017 with Parallel Studio XE 2017 installed on two desktops running Win10. In addition, RAD Studio 10.3 (C++ builder) from Embarcadero is installed on both PC's as well.  On one PC, I got the error in this thread (winres.h not found), and on the other PC, the resource files were not compiled into the EXE's for Fortran projects only.

After the registry key HKEY_CLASSES_ROOT\.rc was deleted, the problems were solved for both PC's. I didn't even re-install VS2017 or XE 2017. Since that key is for XP only, I guessed there is no need to re-install.

I have a third PC (Win8 upgraded to Win10) with VS2017/XE2017, but without RAD Studio installed. Above registry key is present. But no problems at all for years. So it seems that the errors were due to the values of sub-keys under it, which might have been changed to some bad values after  RAD Studio was installed on above two PC's. 

 

0 Kudos