开发者

xcode cannot see my class

开发者 https://www.devze.com 2022-12-29 09:52 出处:网络
I have a class in Classes folder of my project (a .h file and a .m file). When I try to import it like so

I have a class in Classes folder of my project (a .h file and a .m file).

When I try to import it like so

#import <myClass.h>

I get an 开发者_如何学Goerror saying "no such file or directory".

It is definitely there. What could be going on?


You should use

#import "myClass.h"

<> are used for system libraries and "" for local and system libraries.

System libraries are the ones in directories given by the -I and -F or -framework flags on the command line of the compiler

The rules here are the same for C's #include GNU compiler (with the addition for frameworks)

0

精彩评论

暂无评论...
验证码 换一张
取 消