Reputation: 791
#include "missing.h"
I have a library that have missing.h header file which in Full version of the framework I include that library but in lite version I don't want to link that library..
But in objective c when you include missing file it will not continue building it will show an errors that the header "missing.h" is not found.
How can I work around this problem? like to say if the header not found don't include it at all
Upvotes: 0
Views: 99
Reputation: 131418
Ian's answer is good if you really need to not include the header.
Note that #importing the header does not mean that the binary for the library is included in your project, and conversely, not importing the header does not prevent the library's binary from being linked into your project.
The more important thing is changing the build phases step of your "lite" target so it doesn't copy the library into your "lite" application.
Upvotes: 0
Reputation: 14020
You could use preprocessor directives.
#if FULL_VERSION
#include "missing.h"
#endif
Upvotes: 1