Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Headers for my static library not found

I have a static library iOS project ProjectCore, that I want to include in the project MyProject.

In the library project I set:

PUBLIC_HEADERS_FOLDER_PATH = $(TARGET_NAME)

So I end up with the following structure

libProjectCore.a
ProjectCore (Folder)
+- ProjectCore.h
+- ProjectCoreUtil.h

In the directory /.../DerivedData/MyProject-xyzabcd/Products/Release-iphoneos/

Now I setup MyProject

  • Add ProjectCore as a git submodule next to MyProject.xcodeproj
  • Drag the ProjectCore.xcodeproj to Xcode
  • Add the project as a dependency
  • Link against libProjectCore.a
  • I set it's "Header Search Path" to $(BUILT_PRODUCTS_DIR) which should point to the folder above.

Curiously neither of the approaches work:

#import "ProjectCore.h" // With the (Recursive Flag set for the Headers)
#import <ProjectCore/ProjectCore.h> // The way RestKit does it
like image 977
Besi Avatar asked Feb 15 '12 11:02

Besi


1 Answers

I suggest using ${TARGET_BUILD_DIR}/ProjectCore in User Header Search Paths - it works for me.

like image 151
Johnnywho Avatar answered Sep 17 '22 18:09

Johnnywho