delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/17/10:35:30

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=UVw+JyLSzw3PTqri
KzWg4IflYNtYLLP9ZNKxWUuA9jT++ypYRLl+ztF+F0mr3jPcAHEwQAYfjs2BL+xT
eWJ9v4Y0vdsNcm2B7KnYzQlwRfRsX0sGeBGK/5WFiyPWYmzEOoorofMj2ctsrOMB
8B6A7xoOxEFARvOfX8SF5T/JdJM=
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=inAS7MNZIGB3+AGdQZOn9t
r2zxs=; b=QU6aPTMe5CMmvUmv8LmaF4aUXENUwRHZJU1MnZxTqN89ouRb3Vc85O
pcCGmpOIvD+M2I855cDcH8Q7lT3R8yc7s0bdS15IZMXshlg+5cmaPqDfuTa59+iS
KXL1KlYhXDFWwVCJ5OUF5djH4Vw/sdyrrwGfmy6ttjlPiv+oN/jbo=
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=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtpback.ht-systems.ru
Date: Mon, 17 Mar 2014 18:28:25 +0400
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <5110607626.20140317182825@yandex.ru>
To: Csaba Raduly <rcsaba AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: cygwin usage on Windows
In-Reply-To: <CAEhDDbANOV-=TA7taJdE3JBF-pAMvPj_kOZ+rrWnRqP5MXucgw@mail.gmail.com>
References: <53267DE4 DOT 2090303 AT jaymax DOT com> <CAEhDDbANOV-=TA7taJdE3JBF-pAMvPj_kOZ+rrWnRqP5MXucgw AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Csaba Raduly!

>> I have a question that I am sure must have been addressed before, but I
>> cannot find it after days of searching. Of course I am a Newbie with cygwin.
>>
>> I have completed an installation, successfully, I think on an x386 platform
>> w/ Win XP SP3 OS.
>>
>> I can compile a C program from within the cywgin shell (terminal) but cannot
>> do so from a windows page.

This is not strictly Cygwin question, but a common OS level knowledge that is
necessary to operate any complex suite of tools.

>> Attempting to run the executable from the latter,  generate a terse error
>> response, "This application has failed to start because cygwin1.dll was not
>> found. Re-installing the application may fix this problem".
>>
>> Is this the actual mode of performance (executable to be run only from the
>> cygwin shell and not from Windos page) or have I lost functionality along
>> the way?

I have no idea, what you mean by "windows page", but if you want to run
compiled programs directly, you have two choices:

1. If you just need them to work, compile them as native applications. They
would know nothing of Cygwin, would run in native environment and generally
"just work". 
2. If you intend to use Cygwin tools (such as grep, diff, etc.) in your daily
works, along with your compiled tools, make Cygwin part of your system, e.g.
by adding location of cygwin1.dll to your PATH environment variable.

> Cygwin programs need to be able to load cygwin1.dll
> You need to add C:\cygwin\bin to the Windows PATH; then cygwin1.dll
> will be found even when running programs from the command prompt.
> This is a step you have to perform manually; the installer does not do it.

This is not about cygwin1.dll only, else it would be enough to add it to app
paths and call it a day. This is about whole suite of tools that POSIX
standard mandates to be available at specific location, but scripts often
neglect to specify it explicitly.

> There are some potential name clashes between Windows programs and
> Cygwin programs; e.g. find

I would rather call ping. Windows(DOS) FIND is such a poor tool, I seldom
remember using it for good cause.

> If you put C:\cygwin\bin before C:\windows\system32 and type just the
> name of the program, you'll get the Cygwin version even from a Windows
> prompt (which is what I usually do, because I can't remember using the
> Windows version of find). If you put C:\cygwin\bin after
> C:\Windows\system32, you'll get the Windows version.

> From a Cygwin shell, you get the Cygwin version by default (unless you
> change the path in your bash startup script), because Cygwin does some
> magic with the path to get its own bin directory to the front.


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 17.03.2014, <18:07>

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