delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/15/13:29:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,SPF_HELO_PASS,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Ted Byers <r DOT ted DOT byers AT gmail DOT com>
Subject: Re: How do I run a program compiled in cygwin from a program that is running in a Windows CMD shell?
Date: Thu, 15 Sep 2011 17:28:17 +0000 (UTC)
Lines: 64
Message-ID: <loom.20110915T190625-475@post.gmane.org>
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>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://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

LMH <lmh_users-groups <at> molconn.com> writes:
> 
> I am a bit confused as to the role of perl here.
Hi LMH

Thanks

I have an installation of Apache's httpd server; directly from the Apache 
website, not the one available through cygwin (in fact, there'd be no point 
since that apache install is on a different machine).  And I run a number of 
cgi programs written in perl.  That is one role for perl in this setup.  

The other for perl is for my I have a stripped down, basic HTTP Server written 
in perl.  I know, I can probably develop the same thing using boost's asio 
library, but in this case, perl and the http server package are so simple to 
use, I opted for it.  But I developed it using Activestate's Perl 
distribution.  In fact, though I know perl is installed in in my cygwin 
environment, I never bothered with it because Activestate's perl package 
manager has made it so simple to install the hundreds of perl packages that I 
use.  I shudder at the thought of trying to install the same suite of packages 
using cpan from the bash commandline.

> I have compiled under 
> cygwin g++ for a long time now and don't run into problems. Are you 
> using the -mno-cygwin flag in your compile rules? I have two processes, 
> where one is a child of the the processed that gets launched, but both 
> are in c. Maybe it is better to address your issue in the c part of the 
> application, possibly create a little c launcher app that will create 
> the behavior you need.
> 
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).

I tried something like:

g++ -mno-cygwin -o qlt.exe -I/usr/local/include qlt.cpp -quantlib -
L/usr/local/lib

But that resulted in the error I describe just above.  I probably did 
something wrong with this if tht flag is still available in gcc v 4.5.3, but 
then the only place I found anything related to that flag with in a couple 
posts in newsgroups where the OP was dealing with similar issues, but I 
haven't fund the documentation for it.

I have a number of C++ programs that use QuantLib (a C++ quantitative finance 
library).

> Whether you run your c widget from win cmd, bash, call if from perl 
> python, etc, shouldn't really make any difference.
> 
That, actually, is what I am trying to learn.  I now know that etc/profile is 
the file that changes the path to include cygwin/bin, but I couldn't figure 
out how to use bash to launch my program so that is knows about that change 
(i.e. so the child program sees an environment that it would see if executed 
within a bash session I'd launched.  But if the program can be compiled so 
that it doesn't need that modified environment, so much the better.

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

- Raw text -


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