Skip to content

Commit

Permalink
Updated build script for Glfw inclusion in Windows target.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Dec 13, 2024
1 parent 53aa661 commit 9db3c14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/n8/ast/expression/VariableDeclarationExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(
std::string(libName.c_str())
);

std::filesystem::path path(library);
std::cout << "Loading module: " << library << std::endl;
std::cout << "Loading DLLs from: " << path.parent_path().string() << std::endl;

if(Runtime::hasLoadedLibrary(library))
#if defined(__unix__) || defined(__linux__) || defined(__APPLE__)
handle = Runtime::getLoadedLibrary(library);
Expand All @@ -80,10 +84,6 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(
else {
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)

std::filesystem::path path(library);
std::cout << "Loading module: " << library << std::endl;
std::cout << "Loading DLLs from: " << path.parent_path().string() << std::endl;

AddDllDirectory(path.parent_path().wstring().c_str());
handle = LoadLibraryA(library.c_str());

Expand Down Expand Up @@ -122,7 +122,7 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(
#endif
throw ASTNodeException(
std::move(address),
"Failed to load library: " + libName +
"Failed to load library: " + library +
"\r\n " +
#if defined(__unix__) || defined(__linux__) || defined(__APPLE__)
dlerror()
Expand Down

0 comments on commit 9db3c14

Please sign in to comment.