-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Windows SDK is not properly added to the library path #15037
Comments
By default Zig uses
It should then correctly find Windows SDK installed on your system. |
Thanks @michal-z! It's true that I haven't tried using msvc ABI, but to be fair, I kind of don't intend to use it. clang offers a couple of compiler extensions that I reallly like and thus, I'll stick to that. Also, it'd make my C code a mess if I tried to differentiate between compiler versions ( If Zig not adding Windows SDK when using gnu ABI is a defined and expected behaviour, then this issue is, sadly, not an issue. |
When using Also, note that |
Your program should actually work fine.. |
I still have the issue even with using |
Zig Version
0.11.0-dev.2196+bc0f24691
Steps to Reproduce and Observed Behavior
I have been using Zig as a build system for my C code, here goes my build.zig file.
I get this error when compiling.
This static library can be linked against the program if the path to the Windows SDK is explicitly provided to the compiler.
Of course, for demonstration purposes, this piece of code could be limited to hardcoding the full path to my Windows SDK, but I decided to write a slightly more interesting way of doing this and this should work on your PCs.
Here goes main.c file.
Expected Behavior
I suppose that this thing should be already handled by the compiler itself (or so it seems from browsing https://github.com/ziglang/zig/blob/master/src/windows_sdk.cpp file) or... maybe I am missing something?
The text was updated successfully, but these errors were encountered: