[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Native ObjC exception problem.
From: |
Sašo Kiselkov |
Subject: |
Re: Native ObjC exception problem. |
Date: |
Thu, 25 Aug 2005 08:50:57 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.5 |
Quoting "Mehul N. Sanghvi" <mehul.sanghvi@gmail.com>:
> Saso,
>
> According to http://gcc.gnu.org/gcc-3.4/changes.html#3.4.4
>
> The Objective-C front end has been updated to include the numerous bug
> fixes and enhancements previously available only in Apple's version of
> GCC. These include:
>
> * Structured exception (@try... @catch... @finally, @throw) and
> synchronization (@synchronized) support. These are accessible via the
> -fobjc-exceptions switch; as of this writing, they may only be used in
> conjunction with -fnext-runtime on Mac OS X 10.3 and later. See Options
> Controlling Objective-C Dialect for more information.
>
>
> 1. Is the makefile passing the -fobjc-exceptions and -fnext-runtime
> switches to gcc ?
>
> 2. Are you on MacOSX 10.3 or above ? (This is a no, based on your
> the fact that you are using Debian).
>
>
> That's about the end of my knowledge for Objective-C. I know you are
> using 4.0.1, but when looking at the changes for 4.0.1 there was no
> mention of any more improvements to @try or if you could use it on
> non-MacOSX systems. Neither is there a mention of it in 4.1, so you'd
> be wasting time trying to build it :)
>
> Hope this helps.
>
>
> cheers,
>
> mehul
>
>
>
> --
> Mehul N. Sanghvi
> email: mehul.sanghvi@gmail.com
>
Thanks for your suggestions, but I've resolved the issue (or found a work-around
for now, to be more precise) thanks to pinskia (libobjc developer). The GNU
libobjc does include exception handling support (though I don't know about
@synchronized - haven't tested yet) and it in fact works. However, the problem
is when you specify "-O2" to gcc - due to a bug it generates incorrect
references (or roughly so much I understood), so it results in a linking error.
The work-around is either not to use -O2 (e.g. do "make debug=yes") or by
specifying the "-fno-unit-at-a-time" option to gcc when compiling.
---
Saso