authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-09-05 23:00:28-07:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-09-17 03:09:45-07:00
log28f6559947b7acd2ef3c983c90e1215a0d75ae15
tree1355f8b4bc35daef63d55004ec2ba63438158336
parent2a56fe11756fc402a15f159d1c951000487ff3ad

Add the ATLMFC include directory to the libc include dir list

https://learn.microsoft.com/en-us/cpp/mfc/mfc-and-atl Note that this include directory gets added to %INCLUDE% by vcvarsall.bat, and is especially crucial when working with resource files (many .rc files within the https://github.com/microsoft/Windows-classic-samples/ set reference files from the ATLMFC include directory).

1 files changed, 7 insertions(+), 0 deletions(-)

src/Compilation.zig+7
......@@ -5636,6 +5636,13 @@ fn detectLibCFromLibCInstallation(arena: Allocator, target: Target, lci: *const
56365636 if (!is_redundant) list.appendAssumeCapacity(lci.sys_include_dir.?);
56375637
56385638 if (target.os.tag == .windows) {
5639 if (std.fs.path.dirname(lci.sys_include_dir.?)) |sys_include_dir_parent| {
5640 // This include path will only exist when the optional "Desktop development with C++"
5641 // is installed. It contains headers, .rc files, and resources. It is especially
5642 // necessary when working with Windows resources.
5643 const atlmfc_dir = try std.fs.path.join(arena, &[_][]const u8{ sys_include_dir_parent, "atlmfc", "include" });
5644 list.appendAssumeCapacity(atlmfc_dir);
5645 }
56395646 if (std.fs.path.dirname(lci.include_dir.?)) |include_dir_parent| {
56405647 const um_dir = try std.fs.path.join(arena, &[_][]const u8{ include_dir_parent, "um" });
56415648 list.appendAssumeCapacity(um_dir);