ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2000/06/09/12:54:12

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
list-help: <mailto:cygwin-apps-help AT sourceware DOT cygnus DOT com>
list-post: <mailto:cygwin-apps AT sourceware DOT cygnus DOT com>
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-apps AT sourceware DOT cygnus DOT com
Date: Fri, 9 Jun 2000 12:49:09 -0400
From: Chris Faylor <cgf AT cygnus DOT com>
To: "Parker, Ron" <rdparker AT butlermfg DOT com>
Cc: cygwin-apps AT sourceware DOT cygnus DOT com, cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: [cet AT carlthompson DOT net: Re: Extreme newbie here...]
Message-ID: <20000609124909.A23155@cygnus.com>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Mail-Followup-To: "Parker, Ron" <rdparker AT butlermfg DOT com>,
cygwin-apps AT sourceware DOT cygnus DOT com,
cygwin-developers AT sourceware DOT cygnus DOT com
References: <200006091640 DOT JAA15677 AT cygnus DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <200006091640.JAA15677@cygnus.com>; from rdparker@butlermfg.com on Fri, Jun 09, 2000 at 11:39:34AM -0500

On Fri, Jun 09, 2000 at 11:39:34AM -0500, Parker, Ron wrote:
>As a side note, I finally tracked down what was needed to release a new gcc
>w/o the i686-pc-cygwin directory, but will not be able to do so ... you got
>it ... until I get home this evening.  BTW, Chris you should add
>"gcc_tooldir=/usr" and "gcc_tooldir=$inst/usr" to the appropriate make
>commands in the script from which you mailed excerpts yesterday.

Will do.  Thanks for the heads up.

It looks like I have to add a MANIFEST ability too since I screwed up gdb
without noticing.

>There may also be a problem of -mno-cygwin picking up the cygwin header
>files in some cases.  I am looking into this.

I thought I saw this complaint.

>I can say that at least the following trivial program works both when
>compiled as C with gcc and as C++ with my modified g++.
>
><--- hello.c --->
>#include <windows.h>
>
>int APIENTRY WinMain(HINSTANCE a1,HINSTANCE a2,LPSTR a3,int a4)
>{
>        MessageBox(NULL, "Hello, world!", NULL, MB_OK);
>
>        return 0;
>}
><--- End hello.c --->
>
>However adding the simplest exception handling construct as in the following
>code creates a link error.
>
><--- eh_hello.cpp --->
>#include <windows.h>
>
>class foo
>{
>};
>
>int APIENTRY WinMain(HINSTANCE a1,HINSTANCE a2,LPSTR a3,int a4)
>{
>        try {
>                throw foo();
>        }
>        catch (foo& f)
>        {
>                MessageBox(NULL, "Hello, world!", NULL, MB_OK);
>        }
>
>        return 0;
>}
><--- End eh_hello.cpp --->
>
>Link error:
>
>bash-2.04$ g++ -mno-cygwin -fno-rtti hello.cpp -o hello
>/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/libgcc.a(_eh.o): In function
>`_eh_rtime_match':
>/home/src/gcc-2.95.2/gcc/./libgcc2.c(.text+0x389): undefined reference to
>`_impure_ptr'
>collect2: ld returned 1 exit status
>
>If your source code will compile with -fno-exceptions, it should work in
>most cases.

Hmm.  We noticed this when building strace and Mumit submitted a workaround
for it.  If you search the cygwin-developers archive you might find the
reason for this.  I think that the gcc library is somehow pulling in bits
of the cygwin library.

Thanks for the synopsis, Ron.  Much appreciated.

cgf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019