From 33eb8101a25d41b9a19bdad45d109e55e0aa7ee2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 27 Oct 2018 18:21:15 +0200 Subject: Add more include paths for msvc --- src/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index a295eba..1265d3d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -300,6 +300,8 @@ struct MicrosoftBuildTool char umIncludePath[_TINYDIR_PATH_MAX]; // empty if not found char ucrtIncludePath[_TINYDIR_PATH_MAX]; + // empty if not found + char sharedIncludePath[_TINYDIR_PATH_MAX]; bool found() { @@ -314,7 +316,7 @@ static MicrosoftBuildTool locateLatestMicrosoftBuildTool() if (execResult && execResult.unwrap().exitCode == 0) { auto &str = execResult.unwrap().execStdout; - sscanf(execResult.unwrap().execStdout.c_str(), "%d %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n]", + sscanf(execResult.unwrap().execStdout.c_str(), "%d %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n] %[^\r\n]", &result.version, result.binPath, result.vsLibPath, @@ -322,7 +324,8 @@ static MicrosoftBuildTool locateLatestMicrosoftBuildTool() result.ucrtLibPath, result.vsIncludePath, result.umIncludePath, - result.ucrtIncludePath); + result.ucrtIncludePath, + result.sharedIncludePath); } return result; } @@ -341,7 +344,7 @@ static void appendMicrosoftBuildToolToPathEnv() fprintf(stderr, "Warning: Failed to add microsoft build tools to PATH env\n"); } - if (_putenv_s("INCLUDE", join({ msBuildTool.vsIncludePath, msBuildTool.umIncludePath, msBuildTool.ucrtIncludePath }, ';')) != 0) + if (_putenv_s("INCLUDE", join({ msBuildTool.vsIncludePath, msBuildTool.umIncludePath, msBuildTool.ucrtIncludePath, msBuildTool.sharedIncludePath }, ';')) != 0) fprintf(stderr, "Warning: Failed to add microsoft build libraries to INCLUDE env\n"); if (_putenv_s("LIB", join({ msBuildTool.vsLibPath, msBuildTool.umLibPath, msBuildTool.ucrtLibPath }, ';')) != 0) -- cgit v1.2.3