From 3e92c0d40345007b3dbd3e698a2cfc4ef3220d9d Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sun, 22 Dec 2024 21:30:49 +0800 Subject: [PATCH] Fixed Windows build with FARPROC error. --- src/n8/ast/expression/VariableDeclarationExpression.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/n8/ast/expression/VariableDeclarationExpression.cpp b/src/n8/ast/expression/VariableDeclarationExpression.cpp index 32340c2..bf78530 100644 --- a/src/n8/ast/expression/VariableDeclarationExpression.cpp +++ b/src/n8/ast/expression/VariableDeclarationExpression.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #if defined(__unix__) || defined(__linux__) || defined(__APPLE__) @@ -138,10 +139,10 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction( #elif defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) - auto func = (NativeFunction) GetProcAddress( + auto func = std::bit_cast(GetProcAddress( (HMODULE) handle, name.c_str() - ); + )); #endif