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

Include clang system include dir #7

Open
ysbaddaden opened this issue Oct 12, 2015 · 2 comments
Open

Include clang system include dir #7

ysbaddaden opened this issue Oct 12, 2015 · 2 comments

Comments

@ysbaddaden
Copy link
Contributor

I failed to convert a C header with a reference to limits.h, because it eventually #include_next the compiler's own limits.h which can't be found.

I think crystal_lib should add this folder automatically to it's search path. The default place, as per the clang tooling documentation, is $(dirname $(which clang-3.5))/../lib/clang/3.5/include but different Linux distributions are putting them in different locations. See https://github.com/Rip-Rip/clang_complete/blob/master/plugin/libclang.py#L28 for example.

@luislavena
Copy link

@ysbaddaden could output from clang -print-search-dirs be used?

@ysbaddaden
Copy link
Contributor Author

I found a solution: calling cc -E - -v </dev/null will print some informations about local paths, most notably the system include paths to search in order (and the default library paths, too).

It works perfectly on Ubuntu Linux with either GCC or clang.

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