diff --git a/src/n8/ast/expression/VariableDeclarationExpression.cpp b/src/n8/ast/expression/VariableDeclarationExpression.cpp index 53d771c..8022bb8 100644 --- a/src/n8/ast/expression/VariableDeclarationExpression.cpp +++ b/src/n8/ast/expression/VariableDeclarationExpression.cpp @@ -64,6 +64,8 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction( std::string& funcName, std::shared_ptr address ) { + #ifndef __EMSCRIPTEN__ + void* handle; std::string library = N8Util::PathHelper::findSharedLibrary( std::string(libName.c_str()) @@ -161,4 +163,8 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction( } return func; + + #else + throw std::runtime_error("Loading native functions in web mode is not supported."); + #endif }