Koromix/koffi

Compile error when building koffi on Windows

Closed this issue · 2 comments

image

image

Environment:
Visual Studio Version: 2022 Community
Node.js Version: v20.13.1

The meaning of the Chinese characters in the first image are the same as the second picture.
The first image is running by node ../cnoke/cnoke.js
The second image is building project in ./bin/Koffi/win32_x64/v20.13.1_x64 on Visual Studio

This is caused by a bug in the MSVC compiler in Visual Studio 17.10, in the template parser. But the code is fine and works with Visual Studio 17.9 and ealier, and GCC and Clang.

I have added a work around, using /Zc:twoPhase- to use the old non-compliant template parser, and published Koffi 2.8.10 with this.