3

I'm trying to build a static library but i get compile-time errors such as: Unknown type name UIImage or Unknown type name CGSize.

I have added both UIKit and CoreGraphics frameworks to Link Binary With Libraries. What am I doing wrong ??

2 Answers 2

11

If it's compile time errors then it's nothing to do with the libraries you're linking against. This error sounds very much like you haven't included the UIKit headers. Make sure that you have #import <UIKit/UIKit.h> in the files that you're using UIImage and CGSize in.

Sign up to request clarification or add additional context in comments.

Comments

0

The libraries are relevant during the linking phase only. For the compilation, the import statements are relevant.

Most likely you are missing:

#import <UIKit/UIKit.h>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.