-
Notifications
You must be signed in to change notification settings - Fork 175
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
Rust crate does not work with MSVC #169
Comments
This is a bit misleading, as the problem is not as general. It doesn't work specifically with 32-bit MSVC as the compiler. If you have to build for 32-bit Windows (why?), add clang in the Visual Studio installer and execute cargo at x86 Tools Command Prompt. For reference, the prompt gives you 32-bit clang-cl on your |
I'm just trying to I'm using PowerShell inside of VSCode, which is a pretty typical development environment. Not sure why the shell I'm using plays any role in whether or not blst will compile? |
Then your Rust installation is configured with |
Weird, I'm on a 64-bit version of the OS on 64-bit hardware, so I'm really not sure why it decided to default to i686. Setting the target did indeed work. Thanks for the help. |
The Rust crate
blst
does not compile when using MSVC as the compiler.I'm not a C developer, but I did a little digging to figure out the root cause, and it appears that
__STDC_VERSION__
was not defined. Following suggestions in the similar issue #103, I tried addingCFLAGS=/std:c11
, but I got the same error.I tried preprocessing a C file with these variables using C11 and it output the other condition that can cause the
no_asm
file to error, which is__STDC_NO_VLA__
being set to 1.Apparently MSVC does not support Variable Length Arrays, which appears to be an optional extension. I did some research and it seems that they are generally not recommended for a variety of reasons, e.g. security, performance, and portability.
I'm using Windows 11 with Visual Studio 2022.
The text was updated successfully, but these errors were encountered: