- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
If you just delete the .h it in the RC file it will just get added back in automatically
Ссылка скопирована
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
If you just delete the .h it in the RC file it will just get added back in automatically
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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.
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати