C++ program produces no output (g++ 4.3.2, cygwin 1.7)
Larry Hall (Cygwin)
reply-to-list-only-lh@cygwin.com
Thu Apr 23 21:50:00 GMT 2009
Eric Lilja wrote:
> Hi, attached is the source for a C++ program (with a Makefile) that
> produces no output when run (I tried redirecting stdout, that didn't
> work either). I'm running Cygwin 1.7 on a Vista32 machine, Cygwin was
> just updated.
> The code was written september 2007 and then it ran and displayed its
> output just fine. It's a simple AVL Tree with a small test program.
> I'm using g++ 4.3.2. Something seems to be up with cygcheck too, because
> I have attached the wierd looking output it gave me (and it took a while
> for it to complete as well).
>
> Maybe someone could try the program I attached and see if they get the
> same problems as me?
>
> I don't know how to use gdb, but I did try running my code under gdb,
> here's what I got:
> $ gdb testavl.exe
> GNU gdb 6.8.0.20080328-cvs (cygwin-special)
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-cygwin"...
> (gdb) run
> Starting program: /cygdrive/c/coding/kurser/tddi01/avl_tree/testavl.exe
> [New thread 3568.0xe70]
>
> Program exited with code 030000000005.
> You can't do that without a process to debug.
> (gdb)
>
> main() is in the file avl_tree-test.cc (notice the large block of code
> that has been if 0:ed out in that file).
> Also notice the cout first in main() which should be displayed even if
> the program crashes as soon as it tries to instantiate AVL_Tree<int>.
>
> Since this used to work and I haven't touched code I thought I might ask
> for advice here, since I'm using an upgraded compiler and the cygwin 1.7
> test release.
>
> I tried the program under mintty and takecommand, same result.
I tried it with gcc/g++ 3.4.4. Worked fine. Maybe give that a try
and see?
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
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/
More information about the Cygwin
mailing list