Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

eddyq

macrumors member
Original poster
Jun 10, 2009
96
0
The compiler does not find config/config.h

I have an include like this:
#include <config/config.h>
My project is at the same level as the "config" folder.
In Project->Edit Active Target "xxx" I entered the search paths under Search Paths->Header Search Paths as ".". I also tried "./" and I also tried just eliminting the path.
I have verified that config/config.h is available.
It does not find config.h.
I then copied config.h into the level above (same level as the project) and the compiler finds it for all cases of ".", "./" and nothing.

So my question is ... with an include as above, what is the correct procedure to get the compiler to find the given .h file? (note that on other systems such as NetBSD and Linux the include directive is the correct format).
 
Never mind ... I didn't realize that when I made the project it made a new folder for the xcodeproj file. So instead of "." I have to use "..".
 
Well I spoke too soon. Using .. does not work. Does anyone know how to specify the above mentioned include path?
 
Is it a framework or is it just a normal header file.

If it is just a header file have u self created it or is it a system created header?

Stephen
 
The headers are my own headers.

Desktop
-top_level_folder
--foo
---foo.h
---bar.h
---foo.c
--baz
---baz.h
--project_folder
---name.xcodeproj


Throughout the source, header files are included like "#include <foo/foo.h>", "#include <baz/baz.h>"

I have added ".." to the Project->Edit Active Target "name"->Search Paths->Header Search Paths. I also tried using /Users/eddyq/Desktop/top_level. I also tried ".".

I just can't get the compiler to find the the .h files.
 
The headers are my own headers.
...

Throughout the source, header files are included like "#include <foo/foo.h>", "#include <baz/baz.h>"

When you enclose the header name in < >, it means a system include. For user includes, i.e. ones you provide, you should be using "foo/foo.h", and you should specify a user-include path that contains the "foo" folder where "foo.h" can be found.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.