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

ZLS doesn't forward extra flags from the build script to zig translate-c when processing a cImport #2110

Open
vytskalt opened this issue Dec 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vytskalt
Copy link

Zig Version

0.13.0

ZLS Version

0.13.0

Client / Code Editor / Extensions

nvim 0.10.2

Steps to Reproduce and Observed Behavior

Install ImageMagick onto your machine and open ZLS in a file like this:

const c = @cImport(@cInclude("MagickWand/MagickWand.h"));

pub fn main() void {
    c.MagickWandGenesis();
    c.MagickWandTerminus();
}

ZLS reports an error on line 1: you should set MAGICKCORE_HDRI_ENABLE

Relevant code in ImageMagick (link):

#if !defined(MAGICKCORE_HDRI_ENABLE)
# error "you should set MAGICKCORE_HDRI_ENABLE"
#endif

This is a very specific scenario. I don't know what a minimal reproduction example would look like.

Expected Behavior

ZLS should have defined MAGICKCORE_HDRI_ENABLE and other macros from pkg-config.

Relevant Discord thread: https://discord.com/channels/997174129532866701/997174130048770080/1317898503372148756

Relevant log output

No response

@vytskalt vytskalt added the bug Something isn't working label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant