-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
quickjs is not compatible with ucrt of Windows SDK 26100 #622
Comments
我最初也是用终端控制台编译,会报错,后来改用了clion,直接导入cmake项目就行,不报错,完美 |
你的clion用的是minggw还是msvc全家桶?能麻烦下在clion里看看NAN是怎么定义的么? |
I tested the value of NAN under different conditions: Even if defined I don't know if the behavior of quickjs depends on the specific value of NAN. If not, should we add |
Interesting! Do you know how to use that version in a GH Action so we can add a CI? |
maybe you can use this repo: https://github.com/GuillaumeFalourd/setup-windows10-sdk-action |
Looks like 26100 doesn't work though: |
Not sure what you're asking here. |
Try this: https://github.com/marketplace/actions/windows-sdk-install |
Yes. From libbf.c (handles BigInts): Lines 2463 to 2464 in 89883ae
Changing JS_NAN also changes the output of JS_WriteObject, the serializer. That's not exactly fatal but it would be annoying to have two machines produce different output for the same input. |
The WinSDK version can be set in CI via: - name: Install windows sdk
uses: ChristopheLav/windows-sdk-install@v1
with:
version-sdk: 26100
features: 'OptionId.DesktopCPPx86,OptionId.DesktopCPPx64' And specify . |
I'll try to get back to this next week! |
NAN is reportedly no longer a compile-time expression in some versions of MSVC. Work around that by minting a NaN from a uint64. Fixes: quickjs-ng#622 Fixes: quickjs-ng#693
NAN is reportedly no longer a compile-time expression in some versions of MSVC. Work around that by minting a NaN from a uint64. Fixes: quickjs-ng/quickjs#622 Fixes: quickjs-ng/quickjs#693
The macro definition
NAN
is used in quickjs.c.https://github.com/quickjs-ng/quickjs/blob/0c8aeb1d5093869479e914980ef5588020bce64a/quickjs.c#L40297
For Windows platform, NAN is defined in
ucrt/corecrt_math.h
.In Windows SDK 22621:
In this case, the compiler can complete the compilation, but Microsoft has made changes in Windows SDK 26100:
When using SDK 26100, the compiler (msvc-cl 19.41 or clang-cl 19.1) will report an error: C2099 initializer is not a constant.
Is there any way to solve this problem?
The text was updated successfully, but these errors were encountered: