Getting full path to a dynamic library?

Sebastian Trueg trueg at
Wed Dec 3 16:25:52 GMT 2008

nevermind, I simply reused the plugin searching code from Soprano.

Sebastian Trueg wrote:
> Thiago Macieira wrote:
>> On Wednesday 03 December 2008 13:37:10 Sebastian Trueg wrote:
>>> As far as I can tell QLibrary only gives us the filename of a
>>> dynamically loaded library. However, I need to determine the full path
>>> for usage in ODBC. Does anyone know how to determine that in a platform
>>> independent manner?
>> Sorry, what?
>> Are you talking about QLibrary::fileName() ?
> :)
> well, an example. I need the full path "/usr/local/lib64/" 
> and all I know is the name of the lib, ie. "virtodbc". Now QLibrary can 
> find the lib AFAIK using the dynmic linker:
> QLibrary lib( "virtodbc" );
> lib.load();
> now the lib can be used. Thus, the path to the lib file has to be 
> available somewhere. However, the documentation of QLibrary states that 
> fileName will only return "" without the dir path.

More information about the kde-core-devel mailing list