Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 24 Mar 2003 12:33:50 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Kodaj Bence cc: cygwin AT cygwin DOT com Subject: Re: Starting .exe: DOS prompt OK, double-click not In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 as execlp( "wish", "wish", "OurScript.tcl" , ...); instead... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ 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! -- /usr/games/fortune -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/