My project uses a lot of geometry and so I wrote a set of functions that operate on NSPoints (translate, rotate, etc.). I put these in THPointOperations.c and THPointOperations.h and these files are located in "other sources" within Xcode. Since I must tell the compiler what an NSPoint is, I use "#import <Cocoa/Cocoa.h>" in the header. This produces hundreds of errors, all showing at the beginning of THPointOperations.c, but located in the cocoa framework. I know this is just a simple misunderstanding of the basics, but I don't know where to look for the answer. Any suggestions? Here is THPointOperations.h:
Code:
#import <Cocoa/Cocoa.h>
void translate(NSPoint *p, NSPoint q);
NSPoint pointByAdding(NSPoint p, NSPoint q);
NSPoint pointBySubtracting(NSPoint p, NSPoint q);
void scaleBy(NSPoint *p, float t);
void rotate(NSPoint *p, float cosAngle, float sinAngle);
void reflectX(NSPoint *p);
void reflectY(NSPoint *p);
float distance(NSPoint p, NSPoint q);