diff --git a/src/osgDB/DynamicLibrary.cpp b/src/osgDB/DynamicLibrary.cpp index 7154fa24f..c9b2be708 100644 --- a/src/osgDB/DynamicLibrary.cpp +++ b/src/osgDB/DynamicLibrary.cpp @@ -43,6 +43,7 @@ #include #include #include +#include using namespace osgDB; @@ -93,7 +94,11 @@ DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string& libr HANDLE handle = NULL; #if defined(WIN32) && !defined(__CYGWIN__) +#ifdef OSG_USE_UTF8_FILENAME + handle = LoadLibraryW( convertUTF8toUTF16(libraryName).c_str() ); +#else handle = LoadLibrary( libraryName.c_str() ); +#endif #elif defined(__APPLE__) && defined(APPLE_PRE_10_3) NSObjectFileImage image; // NSModule os_handle = NULL;