Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point.h does not use local include form #14

Closed
kyngchaos opened this issue Apr 30, 2012 · 4 comments
Closed

Point.h does not use local include form #14

kyngchaos opened this issue Apr 30, 2012 · 4 comments

Comments

@kyngchaos
Copy link

All headers in spatialindex use the local include form:

#include "tools/Tools.h"

Point.h uses:

#include <spatialindex/tools/Tools.h>

When spatialindex is not installed in a standard location like /usr/local, this causes an error because the parent folder is not specified as a header folder.

@hobu
Copy link
Member

hobu commented Oct 25, 2012

@kyngchaos I think it is only Point.h. All of the other headers in ./include, which are what I would consider the "public includes" of libspatialindex, appear to have local includes when they are specified. Source files in ./src that use these public includes should have them in the non-local form, and it appears as though they do.

I'll fix Point.h, but can you demonstrate a scenario where the current layout fails?

@kyngchaos
Copy link
Author

As mentioned in the bug report, when spatialindex is not installed in a location that is in the default search path for headers, it can't see <spatialindex/...>. Configuration of sources to use spatialindex places the header folder as "-I/some/prefix/include/spatialindex", and /some/prefix/include is not in the header search path.

If spatialindex is in, say, /usr/local, it works because /usr/local/include is in the compiler's default search path.

@hobu
Copy link
Member

hobu commented Oct 25, 2012

ok, I think I understand, and I think my patch here fixes that for the public headers. When compiling libspatialindex itself, it clobbers the -I./include paths to make sure that ./include/spatialindex is seen.

@hobu
Copy link
Member

hobu commented Jul 28, 2014

Closing this for now. Point.h uses the local form now and has for quite a while. Please open again if there's any more of these kinds of issues.

@hobu hobu closed this as completed Jul 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants