Skip to content

Commit

Permalink
Fixed implementation of VariableDeclarationExpression::loadNativeFunc…
Browse files Browse the repository at this point in the history
…tion() for Windows target.
  • Loading branch information
nthnn committed Dec 13, 2024
1 parent 8084b08 commit 2773749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/n8/ast/expression/VariableDeclarationExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)

std::filesystem::path path(library);
std::wstring parentPath(path.parent_path().string().c_str());
std::wstring parentPath = path.parent_path().wstring();

handle = LoadLibraryA(library.c_str());
SetDllDirectoryW(static_cast<LPCWSTR>(parentPath.c_str()));
SetDllDirectoryW(parentPath.c_str());

#elif defined(__APPLE__)
handle = dlopen(library.c_str(), RTLD_LAZY);
Expand Down

0 comments on commit 2773749

Please sign in to comment.