Hi Kirill, It appears that somewhere in your link line, you've made a SSO dependency on the DLL you wanted to be DSO (via dlopen). That SSO dependency may be direct (executable directly has SSO dependency on the DLL) or indirect (some direct SSO itself has a SSO dependency on the DLL). Use the ldd command to see the SSO dependencies of your executable. HTH, --Eljay SSO - static shared object DSO - dynamic shared object DLL - dynamically loaded library (either SSO at load time, DSO via dlopen) HTH - hope that helps On 8/13/08 2:46 PM, "Kirill Pekarov" <kirill_pekarov@xxxxxxxxxxxxxxxx> wrote: > Hi, All. > > Please help me with lazy linking in the Linux. > > I've ELF executable file with shared library. > The executable load the shared using dlopen() when it need it. The executable > also > should work without this shared when the shared is absent, but here I've > stuck. A whole day I can't resolve it. > > When I run executable with absent shared library - I've error message > at start: > "./myprog: error while loading shared libraries: libMyprog.so: Cannot open > shared object file: No such file or directory". > > The question is: What I should tell to the linker to avoid this message? > The executable should work with shared and without it. > man ld, info gcc and Mr. Google can't help me. > > Thanks for any help! > > Debian Etch. GCC 4.1.2 >