views:

20

answers:

2

Hi guys,

I hope you can help with that.

OK i have created new group/folder under Classes - Libs: Classes/Libs and have created class there Msg.h

now I am trying to import it into my RootViewController

#import "Libs/Msg.h"

but I am getting an error:

Libs/Msg.h = no such file or directory    

what should i Do ?

cheers, /marcin

+1  A: 

OK, as it turns out, the Libs is not required just

#import "Msg.h"        

is enaugh even if its in folder level down.

thanks

Marcin
Groups in Xcode and folders in Finder are not related. Groups show up tan in Xcode; folders you add to your Xcode project show up blue (and, importantly, Xcode considers the folder to be a single object, to be [usually] copied all at once—it does not think about anything inside the folder). When you import a header using a path like `Libs/Msg.h`, the preprocessor will look for a Msg.h file in a Libs *folder*. Since you created a group, not a folder, no such folder exists, hence it not finding the file.
Peter Hosey
A: 

What path is your RootViewController in? If you give a path in import, it must be relative to the current file. Also check the case of both directory and file; Mac OS X is case-insensitive, but Xcode and iPhone are not.

mdhughes