Passing linker options to crystal

Is there a way to pass extra -l or -L options to crystal?

I have a program and it’s not linking libxcb so I wanted to force it by adding a -lxcb

Are probably looking for this:

--link-flags FLAGS   Additional flags to pass to the linker
1 Like

yay, yes, exactly that

More ideally you’d put this into the @[Link] annotation itself tho so you don’t have to remember to add this every time. See Link - Crystal 1.13.3 for more details.

It’s a complicated project and sadly this doesn’t fix it so I think I will give up instead.

Background: it’s a static site generator and it’s using imgkit to resize images and I am trying to link statically and … well, linking gets complicated.

It actually uses libvips normally but that one is impossible to static-link

1 Like