delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/11/10:35:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=N01BtF6QXkn1VaKp
1ZgaAU+bc6Nm+vM6fPdpEP9ldaX2UteEYcnSAg3UH1kVXACqcXfSJNCDiDKujkhd
2zbiuqKYtIqCvJXTO27QxE5dR668uJsr14mb5LIPGDNRfb8gr/qle67UnL+VlNHq
kiXCo9bU3hXhHb45RVONbG0TpqQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=p7/taj3sapLG49IEAId8rW
4NhLM=; b=ycVAf5AAyZBSWM34PDT10HB7UJ9qK4NaYlOPjEqsh4CAKJK/I/Vj73
mM+3q9geJUA/CuRrKMsic1jE3ZpK53Tu9BU9YX2zOn8NEnF52d1ls1zsJqbZdb37
DqliAzCsIIR9qMvjWzzEc2mgNb2XMuj4VgngEDTp+EOtYSGetYghk=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtp.ht-systems.ru
Date: Sun, 11 Oct 2015 17:20:01 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <2710156785.20151011172001@yandex.ru>
To: Linda Walsh <cygwin AT tlinx DOT org>, cygwin AT cygwin DOT com
Subject: Re: Running a program using a DLL under Cygwin
In-Reply-To: <5619F993.1030703@tlinx.org>
References: <22038 DOT 29093 DOT 221000 DOT 863384 AT woitok DOT gmail DOT com> <CAJygYd3DLkzj=Va7uuU8-NSjUG6kog0YqBuvhDMMA=0vZwY+=Q AT mail DOT gmail DOT com> <393201296 DOT 20151008181210 AT yandex DOT ru> <5619F993 DOT 1030703 AT tlinx DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Linda Walsh!

>>> I think symlink is a cygwin thing.  Windows won't find that DLL (just
>>> like you won't find it using windows explorer.)
>> 
>> Unless he have created a Windows symlink, that is correct.
>> Explorer, however, may find it, as Cygwin symlinks are Windows LNK files.
> ----
> Cygwin symlinks can use native Windows format, if you put 'winsymlinks:native export'
> in your 'CYGWIN' env var at startup -- preferably in your Win profile.

> However, cygwin occasionally has some bugs in how it creates links:
> /tmp> touch x
> /tmp> ln -s x y    
> /tmp> ll x y
> -rw-rw-r--+ 1 0 Oct 10 22:27 x
> lrwxrwxrwx  1 6 Oct 10 22:28 y -> /tmp/x
> /tmp> cmd /c dir ?|grep '\s[xy]'
> 10/10/2015  10:32 PM                 0 x
> 10/10/2015  10:40 PM    <SYMLINK>      y [C:\tmp\x]
> /tmp> rm y
> /tmp> mklink x y

Do note that native mklink has arguments in the opposite order. (Microsoft...)

> symbolic link created for y <<===>> x
> tmp> cmd /c dir ?|grep '\s[xy]'
> 10/10/2015  10:32 PM                 0 x
> 10/10/2015  10:43 PM    <SYMLINK>      y [x]

> Normally cygwin can create relative symlinks but for some reason 
> using these names -- in /tmp, it did not.

> (if I used a name other than 'y' for the symlink like 'winlink' or 'cyglink'
> then they both were relative links)

> Go figger...

> Also, FWIW Cygwin 'hardlinks' are Windows 'hardlinks'.  
> No significant difference.

Well, it is a difference.
If target of a symlink is deleted and recreated, the symlink will still work.
If a hardlinked file is deleted and recreated, it'll lose the link between the
two.

> So you could use a windows symlink or hardlink created in cygwin
> to the location of your 'dll' and it "should" work (but I haven't
> tested it)

For the purposes of DLL loading, hardlink is probably a good choice.


-- 
With best regards,
Andrey Repin
Sunday, October 11, 2015 17:17:03

Sorry for my terrible english...


--
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