www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/12/10/10:37:46

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36D9E3845854
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1670686628;
bh=jkpEh2SsbEX3T6tyWUyrCOybQO8eeyumBoftcHcEN3U=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=X5+0LK82ksKAcMCxzCIxwoBjoc7a1mA9LZY1hoWsmksbhyqQNl7gYuCjnGGbDFCB+
nXZNc/9ze8hY9M4sxCvMTN+8c26Wz8cAc+Yet+wsrSCqNXVTBvLDeLR6PArcjWGeVY
pWYJ+anFICeskwRw8QYc2U7ofBVJPr/o7hEE+RzQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 757A73848E1A
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=zZvifjqQ7/zKYo4MlZxHbMjL8couuFtq8w4hGKKDdVQ=;
b=Qf3SZU93+Rotn24PB35HH4fPKLtyRopjBZ73DTjZYH6/B/lIfTaCYOpdayxVQR/r5h
lDjI4VPhJudhY7JvOi9/cwvMQ9w8s1vpBgErA81ZI3L8ktsEFg2WBPik9RmDc5xalIUW
UreJec4SEOBmfcvf8r8CSy6LDzQdW0fD/TzkXYy8OfIPwjY9affplx2wIJVSuZJUeJlI
MwbSkze7G+mkgW3XkZAOYKYyiedGgx5dD7V682rTS1fslgBuU5R97JFcNUqb0fEgFbLw
uoquWhwUcH9CnVTrXa8XLFBzBPtIW7LsnZzImiDQyrPS7z8E+GOgEFg0/dllnmJ6d4iD
hbQg==
X-Gm-Message-State: ANoB5pksiQy/mUIjKP6rOI+q1HOtdIpLXFvj0kv7sEZQyIlqjstAAzCY
IIqpc2pg9hLFH195kL4RfNnOiDDXrvBXp9pmj4bccGZ91uEYTA==
X-Google-Smtp-Source: AA0mqf5x1vlOC0ZgJ0iO9YEJ8n1gtaaYroDsffotBe3cjyN7tk+hu4cpr511RkwpXkrErV2eTBfuBkSZrfLiakETN5g=
X-Received: by 2002:a1f:e942:0:b0:3bd:f2ff:b8c6 with SMTP id
g63-20020a1fe942000000b003bdf2ffb8c6mr3870353vkh.9.1670686609826; Sat, 10 Dec
2022 07:36:49 -0800 (PST)
MIME-Version: 1.0
References: <DB9P251MB00639C367F5AA38BF0F18B55DE1C9 AT DB9P251MB0063 DOT EURP251 DOT PROD DOT OUTLOOK DOT COM>
<ae6bc649-4c5c-ffa3-95df-a1723da87b57 AT cs DOT umass DOT edu>
<DB9P251MB0063B590AF74D07C3421C04FDE1F9 AT DB9P251MB0063 DOT EURP251 DOT PROD DOT OUTLOOK DOT COM>
<fcf0363a-b636-027d-06f3-7e94a8a1e0a1 AT cs DOT umass DOT edu>
In-Reply-To: <fcf0363a-b636-027d-06f3-7e94a8a1e0a1@cs.umass.edu>
Date: Sat, 10 Dec 2022 09:36:39 -0600
Message-ID: <CAOWt7BTqcJNDPen=pOUro_AsAPWbzkDzp_CurTanMN_Gqv+bhA@mail.gmail.com>
Subject: Re: Creating the sqlite3.exe stand-alone w/o cygwin dependency
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Cristobal Escamilla Cavazos via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Cristobal Escamilla Cavazos <criesca AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Actually if the dlls is in the same directory it does mean that windows
will look there even if the current directory is not in your path (always
true if the executable is in the same location, only true if safe dll
search is off) given that windows has not found the dll registered in the
system in any other place and there are no overrides anywhere else.

The search goes in this order:
If the dll is already in memory, this is used.
If the dll is in the list of known dlls versions it is loaded from there
(list of dlls is at HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\KnownDLLs)
If it is not found in any of those locations then it is searched
Finally dependencies are resolved using this steps as well

If dll has not been found and it is not overridden by a full path
definition nor a manifest then the search goes as follow
Directory from which the application was loaded
If safe dll search mode is disabled then the current directory is searched
The system directory - starting with the current arch, then fallbacks to
previous archs
The windows directory
And finally all the path environment variable

Hopes this helps a little bit.

Reference:
https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

Best regards - Cristobal E

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

- Raw text -


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