4

I have one main project and another project which is added as a subprojects. I want to access header file which is defined in subproject into the main projects but unfortunate it is saying file not find error.

Please have look on the attach image. what should I modify to access header files of subprojects?

enter image description here

Ajay_Kumar
  • 1,381
  • 10
  • 34
  • 62
  • 1
    possible duplicate of [Xcode 4.2: How to import .h file from subproject](http://stackoverflow.com/questions/9501799/xcode-4-2-how-to-import-h-file-from-subproject) – Anoop Vaidya May 12 '15 at 06:35

1 Answers1

7

You will need to add the path of the sub project to the search path for headers in the main project, for reading how to do it check this Adding system header search path to Xcode

Community
  • 1
  • 1
Omar Abdelhafith
  • 21,163
  • 5
  • 52
  • 56
  • I set HEADER_SEARCH_PATH with "${SRCROOT}" but it still saying header file not fine. – Ajay_Kumar Jun 16 '12 at 13:26
  • it should be the real path of your sub project, such as home/projects/yourproject/ – Omar Abdelhafith Jun 16 '12 at 13:27
  • yes it is compiling fine. But when I am trying to load it in navigation I am getting an linker error "Undefined symbols for architecture i386: "_OBJC_CLASS_$_SubViewContoller",". And my statement of code is " subView = [[SubViewContoller alloc]initWithNibName:@"SubViewContoller" bundle:nil];". – Ajay_Kumar Jun 16 '12 at 13:44
  • allocation is not happening for subproject header files. – Ajay_Kumar Jun 16 '12 at 13:48