From: "Stephan Kämper" Date: 2005-03-24T02:49:47+09:00 Subject: Using DL on Windows Hi all, I'm trying to tie together some Ruby code with a DLL (let's call it 'one.dll') which in turn uses another DLL. That other DLL is Xerces, but that shouldn't matter much. Now, if both of the two DLLs are located in the same directory as the Ruby code things work fine. I do something like: dl_name = DL.dlopen( "one.dll" ) version = dl_name[ "version_of_XY" , "s" ] puts "Version is : #{ version.call }" Now, they're DLLs after all and I'd like to put both of them in another directory, e.g. 'libs'. In that case I'd write dl_name = DL.dlopen( "libs/one.dll" ) version = dl_name[ "version_of_XY" , "s" ] puts "Version is : #{ version.call }" and get an error: dll_test.rb:47:in `initialize': unknown error (RuntimeError) from dll_test.rb:47:in `dlopen' from dll_test.rb:47 However, if I move the 'secondary' DLL (Xerces in this case) back into the directory of the Ruby program everything is fine again. So, my question is: How can I tell DL and/or Ruby where to look for 'secondary' DLLs? Apparently I have to take care about some kind of path I'd guess. But which one? Any help is really appreciated. Happy rubying Stephan