Dear all,
I faced a quite annoying problem. I'll try to explain it as simply as possible. Note that my code is C/C++/Obj-C/Obj-C++ only.
I'm building a framework for which I use several pre-built static libraries, distributed and included in my project as follows
prebuilt
- libraryA.a
- libraryB.a
- include
- libraryA
- headerA1.h
- headerA2.h
- libraryB
- headerB1.h
- headerB2.h
- libraryA
An important point is that libraryB depends on library A, as headerB1.h contains the following line :
#import <libraryA/headerA1.h>All this, along with some additional source code, gets compiled into my framework, which contains everything at the end, ready for distribution.
My problem is that I'd like to put headerB1.h, and therefore headerA1.h in the public headers of the framework.
I can build the framework, but as the Headers directory of a framework is "flat" (no folders tree), whenever the framework client tries to
#import <myFramework/headerB1.h>this leads to a compilation error as the libraryA folder doesn't exist anywhere in the framework.
I can summarize my problem with the following question :
How can I expose as public in a framework a header from an internal static library, so that the app client can use that.
A few details about my case to illustrate with a concrete example :
- libraryA/headerA1.h defines basic types (mostly enums)
- libraryB is a high-level module with an interface, defined in library/headerB1.h and intended to be public, but using some basic types from libraryA/headerA1.h
Thank you all for your help 🙂
Tom