It might be bug in zig cc
, as clearly you are passing -lblas -lgsl -lgslcblas
to the compiler but it ignores blas and gslcblas. Does clang behave the same way btw?
Thanks, good idea! clang $(pkg-config --libs --cflags blas gsl) src/main-gsl.c && ./a.out
prints the expected
Area betweeen [-1.96, 1.96]: 0.950004
I guess now I need to debug zig. I had this on my list anyways, so will look into it.
@Cloudef FYI and to close the loop here as well, please see GSL dependency cblas in nix flake - Help - NixOS Discourse for further analysis and the resulting upstream issue zig build-exe should not strip indirectly needed libraries · Issue #23215 · ziglang/zig · GitHub.