Mail Archives: cygwin-developers/2000/06/09/12:53:30
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 -