delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/15/15:25:11

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.0 required=5.0 tests=AWL,BAYES_50,DENTIST_BODY,DKIM_SIGNED,DKIM_VALID
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: 6hp7xDCswBAZFPiwXTBlX1ARAAZrOcR.nQ--
Message-ID: <4E7250F8.4010402@molconn.com>
Date: Thu, 15 Sep 2011 15:24:40 -0400
From: LMH <lmh_users-groups AT molconn DOT com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Firefox/6.0.2 SeaMonkey/2.3.3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How do I run a program compiled in cygwin from a program that is running in a Windows CMD shell?
References: <loom DOT 20110915T060405-768 AT post DOT gmane DOT org> <loom DOT 20110915T150817-936 AT post DOT gmane DOT org> <4910244359 DOT 20110915185240 AT mtu-net DOT ru> <4E721B17 DOT 5080004 AT molconn DOT com> <loom DOT 20110915T190625-475 AT post DOT gmane DOT org> <4E7239CC DOT 9050209 AT cygwin DOT com> <loom DOT 20110915T194950-750 AT post DOT gmane DOT org>
In-Reply-To: <loom.20110915T194950-750@post.gmane.org>
X-IsSubscribed: yes
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

As stated, the mno-cygwin flag was depreciated in gcc 4. This was what 
you used to link to the windows c runtime instead of the cygwin dll. In 
other words, it let you compile with cygwin gcc and then run on a 
windows box that didn't have cygwin installed (very useful). Since some 
of your issue seemed to be with the cygwin environment, it seemed like 
detaching yourself from it at link time might be a good idea. Windows 
doesn't' know or care whether the app was compiled under gcc or visual 
studio if you used the no-cygwin flag, so I didn't see why it would 
matter how or where you called the app, from perl, bash, cmd, etc.

I have never elevated to gcc 4 and have cygwin configured to only 
install gcc 3. I am sure you could have both installed and point to one 
or the other in your make file depending on what you want. If I remember 
right, the no-cygwin flag was depreciated before the "ming compatible 
cross compiler" was available, so I stayed with 3 at the time. I also 
had issues with 4.1 under linux. I had an app would give different 
floating point answers compiled wiht 4.1 compared to 3.4. This seems to 
have been fixed by 4.3 and the app compiled under 4.3 gives me the same 
answer as 3.4. I don't know if there was a bug in the early 4 versions, 
or what. This may have been an issue with gfortran and not gcc since 
it's a hybrid app.

I also like the fact that 3 is closed and they aren't constantly 
changing the header files and such. It's very annoying to get code that 
compiled under an older version and won't compile any more because they 
changed 10 different header files and no I have to add 56 ifdef 
statements to compile under the new version. Version 3.4 does everything 
I need, so I have stuck with it, especially since I know how to cross 
compile with it. I suppose I will get around to getting version 4 
working, but I have other fish in the pan for now.

It seems like a cross compiled c app to launch your child process would 
be more portable, but I will look at the perl more closely later. I'm 
off to the dentist for now, fun, fun, fun.

LMH



Ted Byers wrote:
> Larry Hall (Cygwin<reply-to-list-only-lh<at>  cygwin.com>  writes:
>
>>
>> On 9/15/2011 1:28 PM, Ted Byers wrote:
>>> LMH<lmh_users-groups<at>   molconn.com>   writes:
>>
>> <snip>
>>
>>> What, exactly, does '-mno-cygwin' do?
>>>
>>> BTW: With gcc v 4.5.3, using 'G++ -mno-cygwin' followed by the other
>>> commandline arguements needed to compile something results in an error
> where
>>> it complains '-mno-cygwin' is no longer valid (I forget the exact wording,
> but
>>> that is the gist of the error message I got).
>>
>> Right. '-mno-cygwin' is not a supported flag for gcc with version 4.  It was
>> there to allow a kind of cross compiler that targets Win32 instead of
>> Cygwin.  This is obviously not what you want anyway so it's of no
>> consequence to you that the flag has been removed.   There are now
>> actual cross compilers available in Cygwin for gcc 4 that serve the purpose
>> of the old '-mno-cygwin' flag.
>>
> Hi Larry,
>
> Thanks
>
> I installed only the gcc4 compilers (all of them, v4.5.3), but I didn't even
> look for cross compilers.
>
> What is the name of the cross compilers (would they be those that
> include 'mingw' in the name?  Not having installed, them, perhaps this is a
> naive question, but will they live alongside the gcc4 compilers without the
> names of the compilers clashing?  I recalled something about mingw, but
> thought that was a completely different approach to having gcc on Windows, and
> in the versions included with RTools, the names of the programs there would
> definitely collide with those for gcc4
>
> Thanks again
>
> Ted
>
>
> --
> 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
>
>

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