Garbage Collection Errors when Creating System Prefs Pane
Garbage Collection Errors when Creating System Prefs Pane
- Subject: Garbage Collection Errors when Creating System Prefs Pane
- From: Robert Monaghan <email@hidden>
- Date: Sat, 24 Sep 2016 07:22:30 -0700
- Dkim-filter: OpenDKIM Filter v2.9.2 mail.gluetools.com 1CD73626013F
Hi Everyone, I am having a really difficult time creating a System Prefs Pane for MacOSX with Xcode. If I do the following, I get compiler errors (as well as other run time errors.) Using Xcode 7.2.1 1. Create an empty System Preference Pane plugin (call it what you wish.. In my case, I called it TestPane). 2. Edit your projects' scheme to use "System Preferences.app" as your Executable, for debugging purposes. (note, you may have to use "csrutil disable" to disable System Integrity Protection.) 3. Once the project is created, rename "TestPane.m" to "TestPane.mm" (I need to include some C++ static libraries.) 4. Compile. At this point you should see a bunch of errors, involving "_OBJC_CLASS_$_NSPreferencePane....." 5. Rename the source file back to "TestPane.m". 6. Clean the project (to get rid of the errors) and rebuild. Things should compile fine.. 7. Run a debug session, with System Preferences.app. Now you will see that your plugin will crash, with the following message: objc[2020]: '/Applications/Xcode.app/Contents/PlugIns/DebuggerUI.ideplugin/Contents/Resources/libViewDebuggerSupport.dylib' was not compiled with -fobjc-gc or -fobjc-gc-only, but the application requires GC objc[2020]: *** GC capability of application and some libraries did not match I haven't enabled GC at all. This is an ARC project. Ok, How do we incorporate C++ into a system Preferencs Pane without GC? C++ used to work with GC enabled Preferences Pane plugins. But I am trying to modernize my code. These types of Bugs?Limitations? etc. prevents me from adopting new development techniques. Without C++ support, I am stuck using GC based code. bob.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden