This is the mail archive of the
cygwin-apps@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: [cet@carlthompson.net: Re: Extreme newbie here...]
- To: Chris Faylor <cgf at cygnus dot com>, cygwin-apps at sourceware dot cygnus dot com, cygwin-developers at sourceware dot cygnus dot com
- Subject: RE: [cet@carlthompson.net: Re: Extreme newbie here...]
- From: "Parker, Ron" <rdparker at butlermfg dot com>
- Date: Fri, 9 Jun 2000 11:39:34 -0500
> Is cygwin really "broken in recent releases"? Does anyone know why?
EXECUTIVE SUMMARY:
Somewhat.
MORE REALISTIC SUMMARY:
From what I have determined exception handling with -mno-cygwin is
definately broken. But that is obvious if you look at the excpt.h. Paul
Baxter actually sent a good email about that to the main list, cf.
http://sourceware.cygnus.com/ml/cygwin/2000-06/msg00346.html.
The other thing that is "broken" is the handling of lib[mc] with g++ which I
have previously mentioned, created a patch to correct, and emailed the new
executable to those that needed it.
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.
There may also be a problem of -mno-cygwin picking up the cygwin header
files in some cases. I am looking into this.
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.
That is a brief synopsis of what I know.
application/ms-tnef