This is the mail archive of the
mailing list for the Cygwin project.
Problem with dlopen()
- From: Juan Jose Garcia-Ripoll <juanjose dot garciaripoll at googlemail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 1 Nov 2009 20:21:26 +0100
- Subject: Problem with dlopen()
This function does some nonstandard things, but the most annoying one
is imposing that the library to be loaded has to have a file
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()
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.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple