Share via

<vcversion_generated.h> referenced inside dllinit.cpp missing

masterjodi 80 Reputation points
2026-03-03T08:24:28.53+00:00

Hi,

When reading MFC source code, inside dllinit.cpp,

#include "stdafx.h"

#include <stdarg.h>

#include <vcversion_generated.h>

#include "sal.h"

<vcversion_generated.h> seems internal to MFC, and I cannot find it either in MFC folders or MSVC/winSDK folders.

My MFC version is 14.44.35027

Could Microsoft show the content of this file?

Regards,

customer

Windows development | Windows API - Win32
0 comments No comments
{count} votes

Answer accepted by question author
  1. RLWA32 52,261 Reputation points
    2026-03-03T10:56:46.15+00:00

    @masterjodi In the past Microsoft allowed for users of Visual Studio to build MFC libraries from the source code installed with the product. Visual Studio 2008 was the last version that provided this capability.

    Prior to VS2022 the include file referenced in MFC's dllinit.cpp file was atlbuild.h and in VS2019 (and previous versions) the file consists of preprocessor definitions.

    Although I don't believe it will provide any useful information from a coding standpoint to satisfy your curiosity following is the contents of VS2019's atlbuild.h file.

    atlbuild

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 15,205 Reputation points Microsoft External Staff Moderator
    2026-03-03T10:24:35.8233333+00:00

    Hi @masterjodi ,

    Thanks for reaching out.

    The key part is the word “generated” in the file name. This header is not a regular, shipped source file. It’s an internal, auto-generated header that’s created as part of Microsoft’s internal build process for the Microsoft Foundation Class Library. It typically contains version-related macros or build metadata used during compilation, but it’s not meant to be distributed with the publicly installed MFC sources.

    The MFC source that ships with Visual Studio is a “build-ready” snapshot, and certain internal build artifacts like this one are not included because they’re generated earlier in Microsoft’s build pipeline.

    In practical terms, there’s nothing missing or broken in your installation. If you’re studying the MFC source, you can safely assume that this header only provides version-related definitions used internally during Microsoft’s compilation process. It isn’t required for consumers building applications with MFC, and it’s not something that needs to be manually recreated.

    Microsoft generally does not publish the contents of internal generated headers, since they are considered part of the internal build infrastructure rather than the public API surface.

    Hope this helps. If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-03T08:24:38.89+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    vcversion_generated.h is an internal, auto‑generated header used when building the MFC shared DLLs themselves. It is not part of the public MFC source drop or SDK headers, and therefore does not appear under the normal MFC, MSVC, or Windows SDK folders.

    From the available documentation:

    • The MFC DLLs (for example, MFC*version*.DLL) are built from the same MFC sources with extra DLL glue such as DLLINIT.CPP and related files.
    • Additional build‑time artifacts (like DEF files, RC files, and internal glue headers) are used to produce the redistributable MFC DLLs but are not intended for consumption when using the MFC source in an application.

    vcversion_generated.h falls into this internal/build‑time category. Its contents are not documented or published in the MFC source conventions, and the documentation does not provide its definition. Only the resulting MFC binaries and public headers are supported for use.

    If code being compiled depends on vcversion_generated.h, that code is effectively part of the internal MFC DLL build and is not meant to be rebuilt or modified outside Microsoft’s build environment. In that case, the recommended approach is to:

    • Use the shipped MFC libraries/DLLs (MFC*version*.DLL, MFC*version*U.DLL, etc.) and their public headers, rather than attempting to rebuild or customize the core MFC DLL implementation.
    • If a custom MFC DLL is required, follow the documented guidance for naming and versioning and avoid relying on internal headers.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.