Adding an OAuth project to Xcode causes Xcode to not find Foundation headers (heavy errors appear)

I am using this OAuth lib: http://github.com/jdg/oauthconsumer

When you add it to my project, it causes more than 2000 build errors. These errors are located in the App_Preficx.pch file in the "Assembly Results" window.

If you actually click on errors, they are actually contained in every Foundation header. I will not list them all, but here are a few examples:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:236:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:236: error: expected identifier or '(' before '@' token

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:238:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:238: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:8:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:8: error: expected identifier or '(' before '@' token

You can see that Xcode cannot reference Foundation, or at least cannot import headers.

If I remove OAuth from Xcode, everything will be back and compiled.

I can add search paths to the content of my hearts, but to no avail.

, , .

2641, . , , .

- , ?

+3
2

.

:

#ifdef __OBJC__
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>

#endif

, :

    #ifdef __OBJC__
        #import <Foundation/Foundation.h>
        #import <UIKit/UIKit.h>

    #endif

    #import "MacroUtilities.h"
    #import "Global.h"

. , Obj-c "" , objective-c c. , .

:

    #ifdef __OBJC__
        #import <Foundation/Foundation.h>
        #import <UIKit/UIKit.h>
        #import "MacroUtilities.h"
        #import "Global.h"
    #endif
+5

, libxml2.dylib "$ SDKROOT/usr/include/libxml2" , README?

0

Source: https://habr.com/ru/post/1754840/


All Articles