This function does some nonstandard things, but the most annoying one is imposing that the library to be loaded has to have a file extension.
If I invoke dlopen("/path/to/temp/dir/temporary_file", ...) then the routine fails with an error like "File or directory does not exist". It is probably not that text, but something similar output by dlerror(). If I rename the file as "temporary_file.foo" then dlopen() succeeds. Using strace reveals that in the first case dlopen() is adding the extension ".dll" and complaining that the file does not exist. In addition to this, the file has to be given executable permissions using chmod() or dlopen will fail. The reason I found this bug is that ECL (Embeddable Common Lisp) compiles lisp files to DLLs and uses nonstandard names for that. With mingw32 and Microsoft Visual Studio C++ we never had a problem, but cygwin broke when we used our code. Juanjo -- Instituto de FĂsica Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple