X-Spam-Check-By: sourceware.org
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 18 Jul 2007 16:02:57 +0200
From: "Hans Streibel" <streibel.2006@gmx.net>
In-Reply-To: <027901c7c941$c6e51e70$2e08a8c0@CAM.ARTIMI.COM>
Message-ID: <20070718140257.83920@gmx.net>
MIME-Version: 1.0
References: <20070718100058.203680@gmx.net> <20070718105312.83940@gmx.net>    <026a01c7c932$4cae0810$2e08a8c0@CAM.ARTIMI.COM>   <20070718121556.83920@gmx.net>  <026e01c7c936$bad581c0$2e08a8c0@CAM.ARTIMI.COM>  <20070718133420.83920@gmx.net> <027901c7c941$c6e51e70$2e08a8c0@CAM.ARTIMI.COM>
Subject: Re: Own Compiled Program Immediately Crashes on Startup
To: cygwin@cygwin.com
X-Authenticated: #31121696
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
Content-Transfer-Encoding: 7bit
X-GMX-UID: 8HH1LoF1TlI8f0iErWlr53ROU2poZVmV
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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).
I think that editor was written even before C++ was invented...
(Nevertheless it still is my favorite text editor)

> > How can I link to a dll directly? It is a dynamic library so
> > as far as I know there is nothing the linker could do here.
> 
> You specify "-l<libname>", and the compiler and linker find the import
> stub library (.dll.a) for you.  That's all I meant by the phrase. 

I put a "-lcygwin" just in front of the "-lncurses".
No difference.

> Anyway, I guess the next thing to try is invoke the executable under
> gdb and see if that shows you any more useful information about where
> it's gotten to when it crashes.

I already did so. Have a look at the "typescript1" attachment
in my original posting. gdb just issues an error that I cannot
understand. But I even get that same gdb error when I try to debug
my running "hello world" program. Thus I suppose it has something
to do with gdb. A different problem.

That I why I inserted a printf() statement right at the
beginning of the main() function.

Ciao

Hans

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

