X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 25 Nov 2008 11:43:37 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: LD_LIBRARY_PATH Message-ID: <20081125104337.GU30831@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <00ec01c94ee7$9166dfe0$4001a8c0 AT mycomputer> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00ec01c94ee7$9166dfe0$4001a8c0@mycomputer> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Nov 25 10:21, John Emmas wrote: > When I compile & build for my Linux installation, library files and shared > objects go to /usr/lib/ > > If I then run an executable (from /usr/bin/) it will automatically find the > shared objects because it expects them to be in /usr/lib/. This isn't > happening for Cygwin and I'm finding that I need to copy the shared > objects into /usr/bin/ > > After googling, I found out that I might be able to set an envinronment > variable called LD_LIBRARY_PATH. So I set it up and tried again - but > unfortunately, without success... :-( Since the process is loaded into memory by the Windows loader, the underlying mechanism to load shared libs at process startup time is the Windows mechanism: http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx $PATH is what you want and if you examine /bin resp. /usr/bin, you see that Cygwin puts all shared libs there for the above reason. /lib resp. /usr/lib only contain the static libs and the shared link stubs necessary for the linker at build time. LD_LIBRARY_PATH only has a meaning in Cygwin's dlopen() implementation, when loading shared libs at runtime. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/