[Qt-interest] Fwd: error while loading shared libraries Mandriva Linux qt 4_5

Nikos Geronitidis geronik444 at gmail.com
Fri Mar 20 11:47:10 CET 2009


Thanks for the info, I have set the library path and now it can be executed
correctly.

---------- Forwarded message ----------
From: Konrad Rosenbaum <konrad at silmor.de>
Date: 2009/3/19
Subject: Re: [Qt-interest] error while loading shared libraries Mandriva
Linux qt 4_5
To: qt-interest at trolltech.com


On Thursday 19 March 2009, Nikos Geronitidis wrote:
> *error while loading shared libraries: libMyLib.so.1: cannot open shared
> object file* : No such file or directory
>
> while this library exists in the same directory the executable exists.
> Any ideas?

Linux is a little different from Windows. ;-)

Unix-like systems (like Linux) handle executables and shared objects (*.so)
differently.

Executables:
*if you call an executable with path (eg. /bin/echo or ./myprogram) it is
executed exactly from the directory you give to the system - if it isn't
there you get an error
*if you call it with no path (eg. echo or myprogram) the system looks for it
in all directories that are in the $PATH variable (separated with ":") and
in exactly the order they are in this variable.

Shared Objects:
*The system knows a few directories which are always looked into (/lib
and /usr/lib)
*The system can configure a few more that are looked into next
(see /etc/ld.so.conf)
*The user can override it all by setting the $LD_LIBRARY_PATH variable (same
syntax as PATH) - the system will look there first and then go through its
configured directories (Warning: the variable name differs on other Unixes)
*The program can also inject directories with the so called "rpath" (which
is compiled in) - that is the reason why Qt is always found by the
application although the Qt directory is not configured anywhere (unless
you use your distributions Qt package)

In short: try to call your program with LD_LIBRARY_PATH=. ./myprogram


       Konrad

--
Note: I'm changing my PGP/GPG key soon! New KeyID: 723A6200
Fingerprint: B37C FA75 8C4C 6537 7954  CBC0 CB15 C991 723A 6200
Keyserver: wwwkeys.eu.pgp.net

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




-- 
Best Regards
Nikos Gerontidis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090320/edf2f5c5/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090320/edf2f5c5/attachment.bin 


More information about the Qt-interest-old mailing list