Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Enabling Objective-C exceptions

Enabling Objective-C exceptions
Thread Tools
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Mar 31, 2004, 06:35 PM
 
Is it possible to enable ObjC exceptions in XCode? I have looked all around and I can't find it. I can't even find where I can add a compiler flag for it. Does anybody use exceptions in ObjC?
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Mar 31, 2004, 06:36 PM
 
It's in build settings somewhere. Get info on a native project.
     
absmiths  (op)
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Mar 31, 2004, 06:40 PM
 
I just looked through the target settings and I couldn't find anything like that under compiler or language. That brings up another point - why does the target settings page look completely different when you choose Cocoa Application or Cocoa-Java Application? I tried to enable java in a current Cocoa app, but was quite frustrated trying to find the Cocoa-Java specific section in the target settings. I created a brand-new project that was a Cocoa-Java app and the setting is right there in the list.
     
Catfish_Man
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Mar 31, 2004, 08:23 PM
 
If found it under the GNU C/C++ compiler options.
     
absmiths  (op)
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Apr 1, 2004, 12:32 PM
 
Originally posted by Catfish_Man:
If found it under the GNU C/C++ compiler options.
Found what? I noticed a section under GCC options for compiler flags, but nothing about exceptions.
     
JNI
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
Apr 1, 2004, 12:43 PM
 
Originally posted by absmiths:
Found what? I noticed a section under GCC options for compiler flags, but nothing about exceptions.
Under the Language settings there is a checkbox for 'Enable Objective-C Exceptions'. That may only work for Xcode 'native targets', I'm not sure.

There is also a way to add it to the options sent to the compiler by adding it to the 'Other C compiler Flags' settings. Look in the gcc command line options listings for the flag to pass. I did it once, but I forget the name of of the flag.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:23 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,