-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Latest version of zig request MSVC C++ Redistributable 2019 package and I don't see any docs #3423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ok it looks like I needed the Microsoft Visual C++ 2019 Redistributable (x64). I manually downloaded it from this page: https://www.itechtics.com/microsoft-visual-c-redistributable-versions-direct-download-links/ The direct download link was: https://aka.ms/vs/16/release/VC_redist.x64.exe This installer deployed the missing dlls and now I can run the zig compiler on this machine. I see these action items:
|
It's a really unfortunate regression, might even warrant releasing 5.0.1. thanks for finding that commit. Let's see if we can figure out why it was done in the first place and then see if reverting it makes sense. The exe is supposed to be fully static. |
some experimentation notes: ref: https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html#prop_tgt:MSVC_RUNTIME_LIBRARY
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d918f2b1..1efbcfd6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 2.8.5)
+cmake_policy(SET CMP0091 NEW)
+set(MSVC_RUNTIME_LIBRARY MultiThreaded)
+
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) |
CI uses vs2019 (MSVC) to build on windows... that commit looks unrelated to issue. |
tools that might be useful for examining exe:
|
duplicate of #3391 (the comments on this issue are really helpful and I will make note of that) |
When I run the latest compiler
0.5.0
or after I now get a missing dll error.This did not occur on the last version of zig I had installed to this machine which was
zig-windows-x86_64-0.4.0+d23798a2
. This version was around July 7th 2019.I'm not sure if zig can statically link in the MSVC runtime libraries. I see a suspicious commit here where it may have been statically linked before but now it no longer is: 357fb4f
In the meantime I've googled and tried to find the MSVC C++ redistributable to install but haven't been able to fix it yet. On this machine I have the following installed:
Even if we can't compile the runtime libraries statically, I feel there should be documentation somewhere that explains where to get these runtime libraries, or the windows binaries should probably use an installer that installs the MSVC C++ Redistributables that it uses.
The text was updated successfully, but these errors were encountered: