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 that

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

Re: Own Compiled Program Immediately Crashes on Startup

2007-07-18 Thread Hans Streibel
It may be missing a DLL it needs. Run cygcheck /path/to/your/binary 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

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 know

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 (KR, pre ANSI C I guess). I

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

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 --- Process 3076,

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't do