This is the mail archive of the
mailing list for the Cygwin project.
Re: Starting .exe: DOS prompt OK, double-click not
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Kodaj Bence <kodaj at freemail dot hu>
- Cc: cygwin at cygwin dot com
- Date: Mon, 24 Mar 2003 12:33:50 -0500 (EST)
- Subject: Re: Starting .exe: DOS prompt OK, double-click not
- Reply-to: cygwin at cygwin dot com
On Mon, 24 Mar 2003, Kodaj Bence wrote:
> > > "/cygdrive/c/OurAppFolder/OurScript.tcl": no such file or directory
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This is a POSIX path.
> > You can translate it to a Windows path using the Cygwin API call
> > cygwin_conv_to_win32_path
> Thanks for the tip, but I'm not sure this is the solution. There's a point
> that I might not have made clear enough in my previous posting:
> Everything's fine when I start OurApp.exe from a DOS prompt.
> Now, OurApp.exe invokes wish like this:
> execlp( "wish", "wish", "./OurScript.tcl" , ...);
> My question is: why does this call work in the "DOS-prompt mode", and
> why doesn't it work in "double-click mode"? Let me emphasize again
> that wish is invoked _in the same way_ in both cases.
> Bence Kodaj
Because from the DOS prompt your program is invoked as ".\OurApp.exe", and
from Explorer it's invoked with a full path (i.e.,
"C:\OurAppFolder\OurApp.exe"). Cygwin translates the current directory
into a POSIX path. In the first case, the current directory is ".\",
which in POSIX is "./". Now, since Windows understands mixed paths, it
interprets this correctly, so your program works. In the second case, the
path becomes what you see in the error message above, which is not
understood by Windows.
I'm not sure how to avoid path translation. You could try invoking wish
execlp( "wish", "wish", "OurScript.tcl" , ...);
|\ _,,,---,,_ pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`' -. ;-;;,_ igor at watson dot ibm dot com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html