Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown type name 'CGFloat' when try to add PanoramaGL to the static library

I try to use panoramaGL framework and try to add it to my static library. So I've imported it to the project, add CoreGraphics framework but have an issue Unknown type name 'CGFloat' in PLStructs.h. When I Cmd+click on the CGFloat in Xcode - I go to the CGBase.h in CoreGraphics framework. Try to clean the project and replace the frameworks - the result is the same. Waiting for your help.

like image 722
ShurupuS Avatar asked Jul 15 '14 05:07

ShurupuS


4 Answers

The solution is simple:

#import <UIKit/UIKit.h>
like image 172
ShurupuS Avatar answered Nov 15 '22 15:11

ShurupuS


Also don't need a full CoreGraphics.h. This is enough:

#import <CoreGraphics/CGBase.h>
like image 23
finico Avatar answered Nov 15 '22 15:11

finico


You actually don't need to import the full UIKit. This is enough:

#import <CoreGraphics/CoreGraphics.h>
like image 13
fabian789 Avatar answered Nov 15 '22 14:11

fabian789


The same problem came for me in Cocos2D.

The solution is

  1. Go to build settings. In Architectures field you might have "Standard architectures (armv7, armv7s, arm64).

  2. The main cause for the problem is arm64. So the best way is to use "armv7" in the field.

  3. We keep the standard architecture as is n "valid architectures"

Hope it helps.

like image 2
Kumar C Avatar answered Nov 15 '22 13:11

Kumar C