iphoneobjective-cxcodeobjective-c++

Compare two Xcode build settings


I have a project where I use two build settings predominantly. Unfortunately today something went wrong. One compiles and the other doesn't. How can I compare the two build settings in XCode to see what the differences are?

(For those interested, the error I get in one build is

jump to case label crosses initialization of 'const char* selectorName'

if you know what this means I'll be very grateful )


Solution

  • You probably declare a variable inside a case without wrapping it all in a brace:

    case foo:
        const char* selectorName;
        // ...
        break;
    

    Should be:

    case foo: {
        const char* selectorName;
        // ...
        break;
    }