-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
For some reason ZLS fails to find conditional headers that Zig has no trouble with? #1851
Comments
I am unable to build this project:
When I use the expected hash I get a new error:
AFAICT, everything in After trying to fix the paths, I end up here:
|
For me it's happening the same with raylib. Im using nvim-lspconfig. It's weird because in vscode works well... |
Same issue here with raylib on Windows 10
Getting 'raylib.h' file not found, while zig compiles fine. |
Please open a new issue about raylib and provide all necessary information so that anyone else can try and reproduce the issue. |
Same here on MacOS, but with ffmpeg, it feels more, that it is about libs that are linked with pkg-config, and are not in system libs.. Simpliest main file:
In build file i am using: |
Zig Version
0.12.0-dev.3609+ac21ade66
Zig Language Server Version
4e01c08
Client / Code Editor / Extensions
Helix
Steps to Reproduce and Observed Behavior
I've ported a few C libraries' build system to Zig for my own projects, and one of them let you enable a feature by passing a build option, and this would add header files to be installed.
The library in question: https://git.sr.ht/~tusf/libdom
The option in question is whether or not to build with
libhubbub
, an HTML parser. If you ranzig build -Dhubbub
it would compile an executable with the proper parsing code, and thezig-out/include
directory would includedom/bindings/hubbub
.In my
build.zig
file, I have:However, when I used this package in a project, ZLS seems to have trouble with headers located here. Given this example:
This compiles just fine, and the return value is just fine:
However, ZLS refuses to completion for
c
, and marks the whole thing with an error: `'dom/bindings/hubbub/parser.h' file not found (cImport)Expected Behavior
I expect to get completions for the contents of
c
, and for the cImport to not fail.Relevant log output
No response
The text was updated successfully, but these errors were encountered: