Re: SOLUTION: Own Compiled Program Immediately Crashes on Startup

2007-07-20 Thread Igor Peshansky
On Thu, 19 Jul 2007, Brian Dessent wrote: > Hans Streibel wrote: > > > Jove is an Emacs like editor. As such it uses the key sequence > > CONTROL-X CONTROL-C (^X^C) for leaving the editor. > > In Cygwin however ^C still sends the interrupt signal to the editor. > > However the keystroke ^C should

Re: SOLUTION: Own Compiled Program Immediately Crashes on Startup

2007-07-20 Thread Hans Streibel
> > Jove is an Emacs like editor. As such it uses the key sequence > > CONTROL-X CONTROL-C (^X^C) for leaving the editor. > > In Cygwin however ^C still sends the interrupt signal to the editor. > > However the keystroke ^C should have been changed to not sending > > that signal. On most platforms

Re: SOLUTION: Own Compiled Program Immediately Crashes on Startup

2007-07-19 Thread Brian Dessent
Hans Streibel wrote: > Jove is an Emacs like editor. As such it uses the key sequence > CONTROL-X CONTROL-C (^X^C) for leaving the editor. > In Cygwin however ^C still sends the interrupt signal to the editor. > However the keystroke ^C should have been changed to not sending > that signal. On mos

SOLUTION: Own Compiled Program Immediately Crashes on Startup

2007-07-19 Thread Hans Streibel
On Wed, Jul 18, 2007 at 08:29:24AM -0700, Brian Dessent wrote: > The problem > occurs when you have a data structure (typically a struct) declared > const that contains any reference to a variable that is imported from > another DLL. A fuller explanation is >

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Brian Dessent
Hans Streibel wrote: > Sorry I can't do that very quickly because I have > no idea what you are talking about :-( > - .rodata > - .data > - linker script, > - strategic un-consting of the offending symbols Sorry, it's actually .rdata not .rodata, and I typed a very abbreviated message in hopes th

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> Exception C005 during process startup sounds a lot like our old > friend Mr. "runtime pseudo-relocs in .rodata". You could rule this out > pretty quickly by temporarily modifying the linker script to place > .rodata in .data, or by strategic un-consting of the offending symbols. Sorry I can

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> > gdb: unknown target exception 0xc135 at 0x7c974ed1 > > That's STATUS_DLL_NOT_FOUND. Interesting. I wonder if something's > interfering with dll loading? How can I know? > > Program exited with code 03000465. > > >~/private/src/jove/jove4.16.0.65[0m $ strace jjove.exe > >--- Proc

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> "gdb: unknown target exception 0xc135" > > Google for '0xc135': it seems to mean STATUS_DLL_NOT_FOUND. > Is every required dll on your $PATH? What are the required DLLs? Those reported by cygcheck? Yes they are in my $PATH (cygwin notation). Hans -- Pt! Schon vom neuen GMX MultiM

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Brian Dessent
Dave Korn wrote: > >~/private/src/jove/jove4.16.0.65 $ strace jjove.exe > >--- Process 3076, exception C005 at 7C929994 > >--- Process 3076, exception C005 at 7C974ED1 > > And those are STATUS_ACCESS_VIOLATION. Odd. Are you, by any chance, > running any of: Exception C005 dur

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 15:03, Hans Streibel wrote: > Hello Dave, > >> Hey, I've never seen it before. I guess it isn't the problem then. >> Trouble is, there's very little else goes on before main. > > Startup code, crt0.o Yep, but that's pretty much the same in every cygwin app, so I would expect

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Greg Chicares
On 2007-07-18 14:02Z, Hans Streibel wrote: > > Have a look at the "typescript1" attachment > in my original posting. gdb just issues an error that I cannot > understand. "gdb: unknown target exception 0xc135" Google for '0xc135': it seems to mean STATUS_DLL_NOT_FOUND. Is every required d

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
Hello Dave, > Hey, I've never seen it before. I guess it isn't the problem then. > Trouble is, there's very little else goes on before main. Startup code, crt0.o > Hans, is there any C++ with static objects with constructors in > this program? No, all is plain old C (K&R, pre ANSI C I guess).

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 14:34, Hans Streibel wrote: >>> How can this link order be changed so that the cygwin dll >>> is linked in first? >> >> Well, for a start, you'd need to link against the cygwin dll directly, >> and it would need to be first on the linker command line. > > How can I link to a dll

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 14:13, Corinna Vinschen wrote: > On Jul 18 13:25, Dave Korn wrote: >> On 18 July 2007 13:16, Hans Streibel wrote: >> > $ cygcheck `pwd`/jjove.exe > C:/cygwin/home/hstreibel/private/src/jove/jove4.16.0.65/jjove.exe > C:\cygwin\bin\cygncurses-8.dll > C:\cygwin\

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> > How can this link order be changed so that the cygwin dll > > is linked in first? > > Well, for a start, you'd need to link against the cygwin dll directly, > and it would need to be first on the linker command line. How can I link to a dll directly? It is a dynamic library so as far as I kno

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Corinna Vinschen
On Jul 18 13:25, Dave Korn wrote: > On 18 July 2007 13:16, Hans Streibel wrote: > > >>> $ cygcheck `pwd`/jjove.exe > >>> C:/cygwin/home/hstreibel/private/src/jove/jove4.16.0.65/jjove.exe > >>> C:\cygwin\bin\cygncurses-8.dll > >>> C:\cygwin\bin\cygwin1.dll > >>> C:\WINDOWS\system32\ADVA

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 13:16, Hans Streibel wrote: >>> $ cygcheck `pwd`/jjove.exe >>> C:/cygwin/home/hstreibel/private/src/jove/jove4.16.0.65/jjove.exe >>> C:\cygwin\bin\cygncurses-8.dll >>> C:\cygwin\bin\cygwin1.dll >>> C:\WINDOWS\system32\ADVAPI32.DLL >>> C:\WINDOWS\system32\ntdll.d

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> >> It may be missing a DLL it needs. Run "cygcheck > " > >> and see if the output lists anything missing. > > > > $ cygcheck `pwd`/jjove.exe > > C:/cygwin/home/hstreibel/private/src/jove/jove4.16.0.65/jjove.exe > > C:\cygwin\bin\cygncurses-8.dll > > C:\cygwin\bin\cygwin1.dll > > C:\

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 11:53, Hans Streibel wrote: >>> The package has an explanation on how to compile >>> jove under cygwin. I followed that explanation and >>> compiling, linking and installing went fine. >>> However the resulting program immediately exits when >>> I try to start it. >>> >>> I even i

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
> > The package has an explanation on how to compile > > jove under cygwin. I followed that explanation and > > compiling, linking and installing went fine. > > However the resulting program immediately exits when > > I try to start it. > > > > I even inserted a printf() statement at the very begi

RE: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Dave Korn
On 18 July 2007 11:01, Hans Streibel wrote: > The package has an explanation on how to compile > jove under cygwin. I followed that explanation and > compiling, linking and installing went fine. > However the resulting program immediately exits when > I try to start it. > > I even inserted a prin