This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I run a program compiled in cygwin from a program that is running in a Windows CMD shell?


On 9/15/2011 6:13 AM, Ted Byers wrote:
The program run, and works, but ...

I have a perl program running from a WIndows CMD shell, that needs to somehow
run it in bash (with my usual environment when I run the bash shell)

If I run bash, I invoke my program my program using './qlt' followed by almost
a dozen commandline arguments.

If I had compiled it using MSVC++, I could invoke it from my perl program
using "my $op = `qlt a nb c args`;"

How do I modify what is within perl's backticks so that qlt is invoked as a
child in my normal bash environment?  Can it be done?

I am not asking about building the program so it doesn't need to run within
cygwin's bash.  I have other tools that let me do that if I must.  Rather, I
want to make a child process that has the cygwin environemt even though the
parent process does not.

Thanks

Ted


bash --login -C "your command here"

Not clear from your description if your perl is cygwin one or not.
It seems not.

Look also cygwin.bat, you can copy and adapt the bash invocation
to a your needs.

Regards
Marco



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]