delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/22/12:44:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AE08BA0.4060601@cwilson.fastmail.fm>
Date: Thu, 22 Oct 2009 12:43:12 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problems with libintl-8
References: <20091022125321 DOT 009ecc39 DOT john AT jcoppens DOT com>
In-Reply-To: <20091022125321.009ecc39.john@jcoppens.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

John Coppens wrote:
> When I run the program from Windows, I get a complaint that
> 'libintl-8.dll' is not found. It _is_ in \cygwin\bin   - just in case, I
> reinstalled it from setup.exe (Yesterday's version), same luck.

"libintl-8.dll" should NOT be in \cygwin\bin -- and a cygwin-compiled
application should not be looking for it.  The *cygwin* version of the
i18n library is "cygintl-8.dll", which is found in the "libintl8"
package. I'm assuming this was simply a typo...if not, then you've
somehow picked up a mingw version of the i18n library.

> Just to be sure, I also reinstalled the entire Cygwin package with the
> newer setup. Same thing.
> 
> I don't know how Windows would find the .dll in \cygwin\bin - which is
> the mechanism? 

Windows uses the following algorithm to find DLLs:
  1. look in the same directory as the .exe
  2. look in the current directory
  3. look in the windows system directory (C:\Windows\system32\)
  4. look in the windows directory (C:\Windows)
  5. look in each of the directories in the PATH
Applications compiled using vis-studio 2005 or newer also can use binary
manifests compiled in to the .exe that explicitly specify certain other
information used to located DLLs; also, certain registry keys can affect
the search path.

But the important bits, for you, are items #1 and #5:

if you install your exe into C:\cygwin\bin, then it should work.

Or, if you set your PATH variable (My Computer->Properties->Advanced
System Settings [*]) so that it includes C:\cygwin\bin, that would work
also.

You could even exploit #2 by creating a Windows Shortcut to your
executable, but set the Start In directory of the shortcut to C:\cygwin\bin.


> Don't I have to copy the dlls to \window\whatever? 

No, no, no, a thousand times no!  Application programs should never
clutter C:\Windows...

> Or is there some path coded in the .exe?

Not for cygwin (see vis studio note, above).

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019