I am trying to use the C library in an Objective-C Xcode project.
The directory structure of the libraries is as follows:
-- include/ |-- config.h |-- lib/ | |-- file1.h | |-- file2.h | |-- file3.h
The docs library says it includes file1.h, and file1.h includes file2.h and file3.h.
I get "file not found" errors for inclusions file2.h and file3.h`. They are included by file1.h as follows:
#include <lib/file1.h> #include <lib/file2.h>
I read here that these angle brackets instruct the preprocessor to search for included files in the path specified by the INCLUDE environment variable, as opposed to searching in the same directory as the file containing #include.
So, I added the INCLUDE environment variable to Xcode by going to Product-> Edit Scheme .. and setting it to /the-whole-path-to/include/ , however I still get a file that was not found by errors.
Files are successfully included if I modify file1.h to include them as follows:
#include "file2.h"
but I would prefer not to do this for every file in the library.
How can i fix this?
c include xcode environment-variables
RyanM Jan 03 '13 at 6:28 2013-01-03 06:28
source share