From 6a1e9e2e057d049c8bab17c0f75e1fbd0c488fe6 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Fri, 13 Dec 2024 20:09:19 +0800 Subject: [PATCH] Fixed implementation of VariableDeclarationExpression::loadNativeFunction() for Windows target. --- src/n8/ast/expression/VariableDeclarationExpression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/n8/ast/expression/VariableDeclarationExpression.cpp b/src/n8/ast/expression/VariableDeclarationExpression.cpp index 9b9218d..523fe0e 100644 --- a/src/n8/ast/expression/VariableDeclarationExpression.cpp +++ b/src/n8/ast/expression/VariableDeclarationExpression.cpp @@ -94,8 +94,8 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction( ); std::wstring searchPath = searchFolder.wstring(); - SetDllDirectoryW(searchPath.c_str()); handle = LoadLibraryA(library.c_str()); + SetDllDirectoryW(searchPath.c_str()); #elif defined(__APPLE__) handle = dlopen(library.c_str(), RTLD_LAZY);