Gen 8.6 build "RC1015: cannot open include file 'afxres.h'"
search cancel

Gen 8.6 build "RC1015: cannot open include file 'afxres.h'"

book

Article ID: 132576

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Host Encyclopedia Gen - Run Time Distributed

Issue/Introduction

Using Gen 8.6 with Microsoft Visual Studio Professional 2017 (15.9.12) or 2019 (16.6.3) or 2022 (17.8.2)

Building Gen sample model Cooperatively packaged application for Windows C. The CASCADE triggers and all load modules fail the resource compile in the Build Tool e.g. Server Manager P900:
=== 
...Compiling Load Module version information 
copy "C:\Program Files (x86)\CA\Gen86\gen\version\applno.bat" "C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\applno.bat" 
1 file(s) copied. 
call "C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\applno.bat" YES "C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\" P900 
APPLNO.BAT : CA Gen BUILDTIME and BUILDVER update file 
rc -r -DWIN -DIEF_BITMAP=. -I"%IEF_BITMAP%" -I"C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\." -I"C:\Program Files (x86)\CA\Gen86\gen\version" -DCUSTOMER_APPL -fo"C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\P900.RES" "C:\Users\Administrator\Documents\CA\Gen 8.6\Models\samp86.ief\c\P900.rc" 
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 

Copyright (C) Microsoft Corporation. All rights reserved. 


C:\Program Files (x86)\CA\Gen86\gen\version\generic.rc(21) : fatal error RC1015: cannot open include file 'afxres.h'. 

NMAKE : fatal error U1077: 'rc' : return code '0x1' 
Stop. 
**************************** 
Resource compile for load module P900 failed with errors. 
**************************** 
File Not Found 
IEFSIGNAL:FAIL 
*** Build for Load Module P900 Failed. *** 
Important! Review above for any errors. 

===

Environment

Release: 8.6
Component: Gen Build Tool

Microsoft Visual Studio Professional 2017
Microsoft Visual Studio Professional 2019
Microsoft Visual Studio Professional 2022

Cause

The root cause of the problem is that the Microsoft Foundation Classes for C++ are missing from the Microsoft Visual Studio Professional 2017, 2019 or 2022 installation.

Resolution

Even though "Desktop development with C++" is selected in the VS installer it does not have all of its options enabled by default.
There is an optional MFC (Microsoft Foundation Classes) feature that needs to be selected as follows.

For VS 2017 select "Visual C++ MFC for x86 and x64":


For VS 2019 select "C++ MFC for latest v142 build tools (x86 & x64)":



For VS 2022 select "C++ MFC for latest v143 build tools (x86 & x64)":



After modifying the VS install to include the required MFC feature the resource compile problem was resolved.

Additional Information

Useful links:
Related KB article: Gen 8.6 required Microsoft Visual Studio 2017, 2019, or 2022 options
For further details of Gen 8.6 PTFs see: Gen 8.6 Solutions & Patches
Gen™ 8.6 > Technical Requirements > Third-Party Software Version - see "Compilers"