Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Объявления
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

AFXRES.H missing....

TonyRichards
Новичок
13 164Просмотр.

I'm trying to recompile legacy Digital Visual Fortran programs using a OneApi Fortran compiler in VS2019.

A particular program in question is a windows dialog based program. VS2019 will not display the program's resource.rc file because of the missing file afxres.h

Do I need it? One piece of advice is to edit it  the .rc file and replace afxres.h with windows.h .

Another is to install Microsoft MFC for C++. Is the Msoft MFC C++ available from the VS2019 installer, do you know?

Any other options?

TIA

Anthony Richards

 

 

 

0 баллов
1 Решение
andrew_4619
Почетный участник III
13 137Просмотр.

1] From solution explorer open the Resource file (.rc).

2] Right click on the top item in the resoure tree  <name>.rc

3] On the pop up menu click "resource includes"

4] Remove afxres.h

5] mine looks like the picture  attached. 

andrew_4619_0-1639953845705.png

If you just delete the .h it in the RC file it will just get added back in automatically

Просмотреть решение в исходном сообщении

5 Ответы
Neels
Новый участник II
13 156Просмотр.

I had the same issue and copied afxres.h from an older install:


Copy "afxres.h" from:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include
to:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\atlmfc\include

 

Hope this helps you.

andrew_4619
Почетный участник III
13 138Просмотр.

1] From solution explorer open the Resource file (.rc).

2] Right click on the top item in the resoure tree  <name>.rc

3] On the pop up menu click "resource includes"

4] Remove afxres.h

5] mine looks like the picture  attached. 

andrew_4619_0-1639953845705.png

If you just delete the .h it in the RC file it will just get added back in automatically

TonyRichards
Новичок
13 104Просмотр.

Thanks for your solution. After Iposted I looked up a recent test program I created in VS2019 and opened its .RC file and found #axfres.h was replaced with #winres.h and #winver.h so I replced #axfres.h accordingly. I was unaware of the edit trick involving the Includes, thanks.

Neels
Новый участник II
13 121Просмотр.

Thank you, that worked but I had to also include the winres.h and winver.h files. Probably because the original .rc file was created with DVF in the late 90's.

andrew_4619
Почетный участник III
13 112Просмотр.

You need to have some stuff defined for the rc file and it has to come from somewhere and that somewhere needs to be installed. Winres.h is part of the VC++ install and is needed. In some other Universes you might have  afxres.h which I believe includes Winres.h within it. I don't think this pertains to DVF in anyway. For some reason this  problem seem to pop up for me every few years.

Ответить