0

I'd like to integrate PLCrashReporter to my static library project and generate a .framework with it embedded.

So far I was following the same hierarchy importing code from their source code XCode project. Drag and drop files to my XCode project. A lot of files needed the linker flag since they don't use ARC but I am.

No I got stuck in a problem I don't quite understand, maybe because of my low level limited experience mixed with Objective-C.

So in the PLCrashSignalHandler.mm file there is a switch with two cases and both stops compile with error 'Case value is not a constant expression'.

switch ((uintptr_t) (next->value().action.sa_handler)) {
                case ((uintptr_t) SIG_IGN):
                    /* Ignored */
                    handled = true;
                    break;

                case ((uintptr_t) SIG_DFL):
                    /* Default handler should be run, be we have no mechanism to pass through to
                     * the default handler; mark the signal as unhandled. */
                    handled = false;
                    break;

                default:
                    /* Handler registered, execute it */
                    next->value().action.sa_handler(signo);
                    handled = true;
                    break;
            }

case ((uintptr_t) SIG_IGN): and case ((uintptr_t) SIG_DFL): stop build with the above error.

Their source code is properly building the project so I'm curious what I miss here.

Thanks.

George Taskos
  • 8,324
  • 18
  • 82
  • 147
  • I just encountered this problem yesterday. To solve it, I closely compared all of the Build Settings from the PLCrashReporter project to what I had in mine. I changed a number of options to match (excluding ones like ARC), so I'm not sure of which specific option corrected the error. – Paul Dardeau Feb 04 '14 at 15:20
  • I stopped with this approach since it introduces so much pain, will come back to this next couple of weeks and maybe post my results. Thank you. – George Taskos Feb 04 '14 at 15:29
  • No, sorry, dropped this scenario anyway, I embedded the .framework into my .framework. – George Taskos May 17 '14 at 00:54
  • @GeorgeTaskos how did you manage to import the PLCrashReporter framework inside you framework? I tried something similar but the user of my framework is still required to import the PLCrashReporter framework alongside with mine... http://stackoverflow.com/questions/34681435/how-to-add-a-framework-inside-another-framework-umbrella-framework – Laur Stefan Jan 20 '16 at 14:55

0 Answers0