Subject: cygwin glib/g_module_build_path
From: Maarten Boekhold <[email-masked]>
To: "Gerrit @ cygwin" <[email-masked]>
Cc: [email-masked]
Date: Sun, 12 Sep 2004 14:46:06 +0400

Hi Gerrit,

Using libtool under cygwin, it is quite common that a shared library 
(eg. cygfoo.dll) is installed in a different directory than the libtool 
library (eg. libfoo.la). libfoo.la would then point to the location of 
the actual DLL:

# The name that we can dlopen(3).
dlname='../bin/cygxfce4_desktop_menu.dll'

An application using g_module_build_path would usually assume that a 
library is installed in the directory where the libtool archive is located.

g_module_build_path as included in the cygwin version does not take any 
.la libtool archives into account at all, and is therefore likely to 
return the wrong location for a specific shared library. However, 
g_module_open *does* know how to handle .la files and find the actual 
location/filename of the DLL in question.

Should we add a special case to gmodule-win32.c:_g_module_build_path() 
that checks whether there exists a libtool archive at the specified 
directory/module_name location (eg. directory + "/lib" + module_name + 
".la") and if so return that as a path? Or would there be a better 
solution for this?

Maarten

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/