From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30737 invoked by alias); 13 Aug 2008 19:58:32 -0000 Received: (qmail 30695 invoked by uid 22791); 13 Aug 2008 19:58:29 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og113.obsmtp.com (HELO exprod6og113.obsmtp.com) (64.18.1.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Aug 2008 19:57:49 +0000 Received: from source ([192.150.11.134]) by exprod6ob113.postini.com ([64.18.5.12]) with SMTP; Wed, 13 Aug 2008 12:57:46 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m7DJs4G3017885; Wed, 13 Aug 2008 12:54:05 -0700 (PDT) Received: from fe1.corp.adobe.com (fe1.corp.adobe.com [10.8.192.70]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m7DJvjiq025819; Wed, 13 Aug 2008 12:57:46 -0700 (PDT) Received: from namailgen.corp.adobe.com ([10.8.192.91]) by fe1.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Aug 2008 12:57:46 -0700 Received: from 10.7.234.24 ([10.7.234.24]) by namailgen.corp.adobe.com ([10.8.192.91]) via Exchange Front-End Server namail.corp.adobe.com ([10.8.189.97]) with Microsoft Exchange Server HTTP-DAV ; Wed, 13 Aug 2008 19:57:45 +0000 User-Agent: Microsoft-Entourage/12.12.0.080729 Date: Wed, 13 Aug 2008 20:26:00 -0000 Subject: Re: Lazy linking. From: Eljay Love-Jensen To: kirill_pekarov , GCC-help Message-ID: In-Reply-To: <1266807070.20080813224632@valentina-db.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00134.txt.bz2 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" 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 >