[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to know the exact path of installed shared library?

From: Kent Boortz
Subject: Re: How to know the exact path of installed shared library?
Date: Sat, 21 Jul 2007 01:15:54 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (darwin)

Ralf Wildenhues <address@hidden> writes:
>> For legacy reasons a ODBC driver is installed into "/usr/lib" or
>> "/usr/local/lib" even if more to be considered a "plugin" than a
>> normal shared library (i.e. it will be loaded with dlopen()).
> I suppose at this point I should be promoting libltdl, and its
> lt_dlopen/lt_dlopenext as portable dlopen wrappers, and its facilities
> for search paths.

It is the driver manager that does the loading, something I have no
control over. But at least unixODBC uses libltdl I think.

>> Together with building and installing the driver, I also want to put
>> the path of the installed driver into a script generated in the build.
>> A script to register the driver with an ODBC manager. But the script
>> needs to contain the path to the driver install location, including
>> possible ".so", ".dylib", ".sl" or similar shared library extension.
> Look at the generated .la file.  'libdir' contains the directory.
> Either 'dlname', or, if empty, the last entry of 'library_names', is
> the library name to open.  Look in libltdl/ltdl.c for details.  You may
> have to do extra work on w32.

Thank you for the hint.

>> I was thinking of something like in the make file
> [...]
>>           DRIVER_PATH=`libtool --print-shared-install-path`
> A convenient interface such as you suggest does not exist, sorry.
> Hope that helps.

You are providing the best free support anyone can ask for :-)



Kent Boortz, Senior Production Engineer
Office: +46 18 174400 ext. 4450 (VoIP)
Office: +46 19 182931
Mobile: +46 70 2791171

reply via email to

[Prev in Thread] Current Thread [Next in Thread]