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);