You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a class has a member variable called bool, Hashlink's C output fails to properly "escape" the name of the variable which causes syntax errors when compiling the C output:
1>[...]\HL_BoolKeyword\out\_std\TShaderConstant.h(21,7): error C2632: 'bool' followed by 'bool' is illegal
1>[...]\HL_BoolKeyword\out\_std\TShaderConstant.h(21,11): error C2208: 'bool': no members defined using this type
1>[...]\HL_BoolKeyword\out\_std\Main.c(34,15): error C2059: syntax error: 'type'
1>[...]\HL_BoolKeyword\out\_std\Main.c(37,8): error C2275: 'String': expected an expression instead of a type
...
The generated code contains invalid lines like these:
Instead, bool should be renamed to _bool like other keywords. I think that in order to fix this, bool just needs to be added here. I don't have a build environment for Haxe at the moment, so I would appreciate if someone else could fix this. I attached a minimal example project below.
Windows 10 22H2 64 bit
Haxe 4.3.1 (stable release version)
Visual Studio 2022 (v17.7.0)
HL_BoolKeyword.zip
build.hxml is configured for Visual Studio 2019, so you might need to adjust this for your environment. Note that I opened the .sln with VS 2022 and let it upgrade the platform toolset to v143 (I don't have VS 2019 installed but HL doesn't have a VS 2022 config yet), but I'm confident that the issue is not related to the Visual Studio version. It also doesn't matter whether you compile for debug or release.
The text was updated successfully, but these errors were encountered:
If a class has a member variable called
bool
, Hashlink's C output fails to properly "escape" the name of the variable which causes syntax errors when compiling the C output:The generated code contains invalid lines like these:
Instead,
bool
should be renamed to_bool
like other keywords. I think that in order to fix this,bool
just needs to be added here. I don't have a build environment for Haxe at the moment, so I would appreciate if someone else could fix this. I attached a minimal example project below.Windows 10 22H2 64 bit
Haxe 4.3.1 (stable release version)
Visual Studio 2022 (v17.7.0)
HL_BoolKeyword.zip
build.hxml is configured for Visual Studio 2019, so you might need to adjust this for your environment. Note that I opened the .sln with VS 2022 and let it upgrade the platform toolset to v143 (I don't have VS 2019 installed but HL doesn't have a VS 2022 config yet), but I'm confident that the issue is not related to the Visual Studio version. It also doesn't matter whether you compile for debug or release.
The text was updated successfully, but these errors were encountered: