This is the mail archive of the cygwin@cygwin.com 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]

Starting .exe: DOS prompt OK, double-click not


Hi all,

We are porting a Linux application to Windows. The app heavily uses 
POSIX calls like fork(), and we don't want to rewrite it, therefore we 
have to rely on Cygwin. The source is in C++; we compile & build it with 
the Cygwin tools. Our problem is the following: the resulting .exe can 
be started only from a DOS prompt. When I double-click on the file in 
Windows Explorer, I get an error message. What might cause this?

Details: the setup on my machine looks like this:
C:\
  OurAppFolder\
       OurApp.exe
       OurScript.tcl
       cygwin1.dll

When OurApp.exe starts up, it invokes Tcl/Tk's "wish" shell, and passes 
OurScript.tcl to it for interpretation. (The actual Tcl/Tk installation on my 
machine is ActiveTcl 8.4., but that's not really important.)

Now, when I double-click on OurApp.exe in Windows Explorer, I get the 
following error message from wish:

Error in startup script
couldn't read file "/cygdrive/c/OurAppFolder/OurScript.tcl": no such file 
or directory

But when I open a DOS prompt in OurAppFolder and start OurApp from 
there, then everything's fine. (Notice that it's a plain DOS prompt, not 
Cygwin's bash.)

So my question is: what's the reason for this behavior? To me it seems 
that the C:\OurAppFolder\OurScript.tcl path gets transformed into its 
Cygwin equivalent, and wish doesn't understand the transformed path. 
But why is everything OK from the DOS prompt? And is there a way to 
make the double-click work as expected?

Any help is greatly appreciated. Please cc replies to kodaj at freemail dot hu 
as well.

Thanks in advance,
Bence Kodaj

P.S.: I've attached the result of "cygcheck -s -v -r ". (You might find that 
some of the developer tools are missing; that's because OurApp.exe 
has been built on a different machine, I'm just running it.)

Attachment: cygcheck.txt
Description: Text document

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

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