From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
To: Robert Collins <robert.collins@itdomain.com.au>,
cygwin@sources.redhat.com
Subject: Re: DLL naming conventions
Date: Mon, 04 Sep 2000 08:09:00 -0000 [thread overview]
Message-ID: <39B3BB23.852CAEBF@ece.gatech.edu> (raw)
In-Reply-To: <39B3B044.765E2666@ece.gatech.edu>
> Not necessarily, if the PATH settings (or insuring that all dll's and
> exe's go into the same directory) are sufficient to prevent problems. I
> don't think so, personally. As distasteful and painful as renaming all
> the dll's is, it *may*, repeat *may*, be the best option. I believe
> Chris is proactively doing some research; it is possible that we can do
> something else, and avoid the 'cyg' prefix -- like using the 'AppPath'
> registry or something.
>
> It's just that there is an ingrained desire to stay as unix-like as
> possible -- and that means, libraries start with 'lib', not 'cyg'. If
> AppPath can fix the problem, then I'd prefer that cygwin's install.exe
> set the appropriate registry entry whenever installing an executable.
> This won't catch *everything*, but dagnabbit, I'm tired of packages
> installing themselves with cp (which break on cygwin thanks to the .exe
> suffix). They oughta use install.
Here's the search order for DLL's when an AppPath key is set for the
executable in the registry:
1.The directories listed in the App Path registry key
2.The directory where the executable module for the current process is
located.
3.The current directory.
4.The Windows system directory. The GetSystemDirectory function
retrieves the path of this directory.
5.The Windows directory. The GetWindowsDirectory function retrieves the
path of this directory.
6.The directories listed in the PATH environment variable.
See http://codeguru.earthweb.com/dll/AppPath.shtml
So, if all .exe's are installed using 'install.exe', and install.exe is
made smart enough to create an AppPath key for each one -- the problem
is solved!
(sotto voce: ermmm...three minor problems:
1. The AppPath entry must be in windows-format:
C:\cygwin\bin;C:\cygwin\usr\local\bin NOT /bin:/usr/local/bin. What
happens when you reinstall cygwin to a different location -- say
D:\cygwin -- and change the mount points?
2. The AppPath entry is keyed by the program name:
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\foo.exe
default value is string = "C:\cygwin\usr\local\bin\foo.exe"
string value named "Path" = "C:\cygwin\bin;C:\cygwin\usr\local\bin"
What if you have two foo.exe's -- one cygwin, and one mingw ?
3. It doesn't work if there is already a dll with the same name, loaded
into memory (for Win95, Win98, and WinNT; the following analysis doesn't
apply to Win98SE or W2K)
e.g.
c:\cygwin\usr\local\bin\app1.exe
(app1.exe has AppPath key so that c:\cygwin\usr\bin is searched
first)
c:\cygwin\usr\bin\my-dll.dll
c:\mingw\usr\local\bin\app2.exe
(app2.exe has AppPath key so that c:\mingw\usr\bin is searched
first)
c:\mingw\usr\bin\my-dll.dll
Run app1.exe -- fine, c:\cygwin\usr\bin\my-dll.dll gets loaded.
Run app2.exe -- *will not load* c:\mingw\usr\bin\my-dll.dll into memory.
This analysis extrapolated from description in:
http://codeguru.earthweb.com/mfc/comments/6493.shtml
Maybe the problem isn't solved by AppPath, after all.
--Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
next prev parent reply other threads:[~2000-09-04 8:09 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-04 5:31 Bernard Dautrevaux
2000-09-04 5:44 ` Robert Collins
2000-09-04 6:26 ` Corinna Vinschen
2000-09-04 7:23 ` Charles S. Wilson
2000-09-04 8:09 ` Charles S. Wilson [this message]
2000-09-04 11:03 ` Chris Faylor
2000-09-04 14:19 ` Robert Collins
2000-09-05 14:08 ` David A. Cobb
-- strict thread matches above, loose matches on Subject: below --
2000-09-05 8:56 Earnie Boyd
2000-09-05 5:37 Earnie Boyd
2000-09-05 7:32 ` Egor Duda
2000-09-05 7:40 ` Larry Hall (RFK Partners, Inc)
2000-09-06 2:28 ` Egor Duda
2000-09-04 8:38 Bernard Dautrevaux
2000-09-04 13:59 ` Robert Collins
2000-09-05 14:38 ` David A. Cobb
2000-09-05 14:52 ` David A. Cobb
2000-09-05 15:08 ` Robert Collins
2000-09-04 8:18 Bernard Dautrevaux
2000-09-04 6:59 Bernard Dautrevaux
2000-09-04 6:11 Bernard Dautrevaux
2000-09-05 14:28 ` David A. Cobb
2000-09-01 4:49 Tor Lillqvist
2000-09-01 6:47 ` Charles S. Wilson
2000-09-02 6:56 ` Gary V. Vaughan
2000-09-02 11:36 ` Charles S. Wilson
2000-09-02 16:40 ` Gary V. Vaughan
2000-09-02 19:20 ` Chris Faylor
2000-09-02 21:23 ` Robert Collins
2000-09-02 22:56 ` Charles Wilson
2000-09-03 5:31 ` Gary V. Vaughan
2000-09-03 9:31 ` Chris Faylor
2000-09-03 10:32 ` Chris Faylor
2000-09-04 6:56 ` Gary V. Vaughan
2000-09-02 22:32 ` Charles Wilson
2000-09-03 5:29 ` Gary V. Vaughan
2000-09-03 12:40 ` Alexandre Oliva
2000-08-31 23:56 Bernard Dautrevaux
2000-09-01 6:40 ` Charles S. Wilson
2000-09-01 6:58 ` Larry Hall (RFK Partners, Inc)
2000-08-31 23:55 Bernard Dautrevaux
2000-08-31 12:41 Earnie Boyd
2000-08-31 12:43 ` Chris Faylor
2000-08-31 13:44 ` Charles Wilson
2000-08-31 14:14 ` Chris Faylor
2000-08-31 15:36 ` Charles S. Wilson
2000-08-31 15:44 ` Robert Collins
2000-08-31 15:51 ` Charles S. Wilson
2000-08-31 16:06 ` Robert Collins
2000-08-31 15:46 ` Tor Lillqvist
2000-08-31 17:19 ` Chris Faylor
2000-09-02 9:36 ` David A. Cobb
2000-09-02 9:43 ` Chris Faylor
2000-08-31 15:19 ` Michael Ring
2000-08-31 6:40 Earnie Boyd
2000-08-31 8:47 ` Charles S. Wilson
2000-08-31 8:56 ` Chris Faylor
2000-08-31 9:47 ` Egor Duda
2000-08-31 11:12 ` Chris Faylor
2000-08-31 11:33 ` Matt Minnis
2000-08-31 11:40 ` Chris Faylor
2000-08-31 13:01 ` Tor Lillqvist
2000-08-31 4:22 Bernard Dautrevaux
2000-08-30 9:45 Bernard Dautrevaux
2000-08-30 12:13 ` Charles Wilson
2000-08-30 3:36 Paul Sokolovsky
2000-08-30 7:26 ` Chris Faylor
2000-08-31 4:21 ` Re[2]: " Paul Sokolovsky
2000-08-31 8:56 ` Chris Faylor
2000-08-30 7:48 ` Charles Wilson
2000-08-30 7:52 ` Chris Faylor
2000-08-30 8:07 ` Norman Vine
2000-08-30 8:17 ` Charles Wilson
2000-08-30 8:19 ` Charles Wilson
2000-08-30 11:37 ` Chris Faylor
2000-08-30 8:11 ` Charles Wilson
2000-08-31 5:07 ` Re[2]: " Paul Sokolovsky
2000-08-31 8:58 ` Charles S. Wilson
2000-08-31 11:28 ` Re[2]: " Tor Lillqvist
2000-08-31 11:47 ` Chris Faylor
2000-08-31 12:07 ` Larry Hall (RFK Partners, Inc)
[not found] ` <20000831230822.R7695@demon.co.uk>
2000-08-31 18:58 ` Charles S. Wilson
2000-09-02 6:56 ` Gary V. Vaughan
2000-08-31 20:27 ` Charles S. Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39B3BB23.852CAEBF@ece.gatech.edu \
--to=cwilson@ece.gatech.edu \
--cc=cygwin@sources.redhat.com \
--cc=robert.collins@itdomain.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).