diff --git a/solanaceae/plugin/plugin.cpp b/solanaceae/plugin/plugin.cpp index fa53bf6..5e7823d 100644 --- a/solanaceae/plugin/plugin.cpp +++ b/solanaceae/plugin/plugin.cpp @@ -41,7 +41,17 @@ Plugin::Plugin(const char* path) { #endif if (!_dl) { - std::cerr << "PLG opening '" << path << "' failed\n"; + std::cerr << "PLG opening '" << path << "' failed"; +#if defined(_WIN32) || defined(_WIN64) + // TODO: windows error reporting + std::cerr << ": " << GetLastError() << "; +#else + const auto* error = dlerror(); + if (error != nullptr) { + std::cerr << ": '" << error << "'"; + } +#endif + std::cerr << "\n"; return; }