-
Notifications
You must be signed in to change notification settings - Fork 66
Setup change: Making headers public on static lib target #56
Comments
Hm. Is this really necessary? The headers already get copied to the framework's Headers subdirectory, which is where they should be searched by targets that build against the framework. You may just need to add entries to the framework search path of your target so the compiler can find the frameworks. |
That doesn't work in my build because I'm using the static lib targets, not the framework. Hence the headers are not available. I've been updating the TouchDB inclusion to have the iOS Framework as the Target dependencies so that the headers are copied to the build directories. I then added "${BUILD_DIR}/${CONFIGURATION}-ios-universal/TouchDB.framework/Headers" to the Header Search Paths. But it's not working. Here is the error I'm getting: CompileC "/Users/sensis/Library/Developer/Xcode/DerivedData/Yellow_Live-hjonvxmdefkfunfvuxxnhrrtewqe/Build/Intermediates/Yellow Live.build/Debug-iphonesimulator/YellowLive.build/Objects-normal/i386/TouchDBServer.o" classes/TouchDBServer.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler In file included from /Users/sensis/projects/Yellow live/classes/TouchDBServer.m:11: |
Yeah, this sort of thing is why I'm really reluctant to touch the build configuration at all. Any change has a likelihood of triggering this sort of build breakage in the project itself, or in Syncpoint. :( Linking against the framework is the right approach for your project; the static-library targets are really just internal. I'm not sure why you're getting those errors; check whether the header search path you're using actually expands to the correct path at build time. |
Hi, I have not submitted a pull on this because it's a change to the project file and will trigger a merge conflict.
I'm using both CouchCocoa and TouchDB. The technique I'm using is to include them as XCode sub projects of my main project and do workspace builds. This helps with debugging and makes combined builds easier. However my project would not build because it could not find the CouchCocoa and TouchDB headers.
To fix this I did these changes:
#import <project/header.h>
statement. ie.#import <CouchCocoa/CouchCocoa.h>
.The result is that the headers are now accessible to the main project.
I think doing this in both projects doesn't effect your normal builds or targets, but makes it really easy to use them as sub projects and therefore have them built as part of the normal build. This saves me having to go through a manual process of building the frameworks and also helps when debugging.
Could this change be make on both CouchCocoa and TouchDB please?
ciao
Derek
The text was updated successfully, but these errors were encountered: